{"id":1011095,"date":"2024-12-27T11:26:57","date_gmt":"2024-12-27T03:26:57","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1011095.html"},"modified":"2024-12-27T11:27:00","modified_gmt":"2024-12-27T03:27:00","slug":"python%e5%a6%82%e4%bd%95%e5%86%99%e6%b1%89%e5%ad%97","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1011095.html","title":{"rendered":"python\u5982\u4f55\u5199\u6c49\u5b57"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25085353\/383a8b09-4338-4704-ad5d-ee773581411c.webp\" alt=\"python\u5982\u4f55\u5199\u6c49\u5b57\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u5199\u6c49\u5b57\u4e3b\u8981\u6d89\u53ca\u5230\u5b57\u7b26\u7f16\u7801\u7684\u95ee\u9898\u3002<strong>Python\u4e2d\u4f7f\u7528Unicode\u5b57\u7b26\u7f16\u7801\u6765\u8868\u793a\u6c49\u5b57\u3001\u901a\u8fc7\u5b57\u7b26\u4e32\u524d\u52a0u\u8868\u793aUnicode\u5b57\u7b26\u4e32\u3001\u4f7f\u7528\u5408\u9002\u7684\u7f16\u8f91\u5668\u548c\u7ec8\u7aef\u663e\u793a\u6c49\u5b57<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528Unicode\u5b57\u7b26\u7f16\u7801\u662f\u6700\u5173\u952e\u7684\u4e00\u6b65\uff0c\u56e0\u4e3a\u5b83\u80fd\u4fdd\u8bc1\u6c49\u5b57\u5728\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\u548c\u73af\u5883\u4e2d\u6b63\u786e\u663e\u793a\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528UNICODE\u5b57\u7b26\u7f16\u7801<\/p>\n<\/p>\n<p><p>Unicode\u662f\u4e00\u79cd\u7edf\u4e00\u7684\u5b57\u7b26\u7f16\u7801\u6807\u51c6\uff0c\u51e0\u4e4e\u6db5\u76d6\u4e86\u6240\u6709\u4e66\u5199\u7cfb\u7edf\u7684\u6240\u6709\u5b57\u7b26\u3002\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u9ed8\u8ba4\u4f7f\u7528Unicode\u7f16\u7801\uff0c\u8fd9\u610f\u5473\u7740\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728\u5b57\u7b26\u4e32\u4e2d\u4f7f\u7528\u6c49\u5b57\uff0c\u800c\u4e0d\u9700\u8981\u7279\u6b8a\u7684\u7f16\u7801\u8f6c\u6362\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b9a\u4e49\u548c\u4f7f\u7528Unicode\u5b57\u7b26\u4e32<\/strong><\/li>\n<\/ol>\n<p><p>\u5728Python 3\u4e2d\uff0c\u5b57\u7b26\u4e32\u9ed8\u8ba4\u662fUnicode\u7f16\u7801\uff0c\u8fd9\u610f\u5473\u7740\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528\u6c49\u5b57\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">chinese_text = &quot;\u4f60\u597d\uff0c\u4e16\u754c&quot;<\/p>\n<p>print(chinese_text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Python 2\u4e2d\uff0c\u4f60\u9700\u8981\u5728\u5b57\u7b26\u4e32\u524d\u52a0\u4e0a<code>u<\/code>\u6765\u8868\u793aUnicode\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">chinese_text = u&quot;\u4f60\u597d\uff0c\u4e16\u754c&quot;<\/p>\n<p>print(chinese_text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u7f16\u7801\u548c\u89e3\u7801<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u5904\u7406\u6587\u4ef6\u8f93\u5165\u8f93\u51fa\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u5bf9\u5b57\u7b26\u4e32\u8fdb\u884c\u7f16\u7801\u548c\u89e3\u7801\u3002\u5728Python 3\u4e2d\uff0c\u901a\u5e38\u4f7f\u7528<code>encode()<\/code>\u548c<code>decode()<\/code>\u65b9\u6cd5\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u7f16\u7801<\/p>\n<p>utf8_bytes = chinese_text.encode(&#39;utf-8&#39;)<\/p>\n<p>print(utf8_bytes)<\/p>\n<h2><strong>\u89e3\u7801<\/strong><\/h2>\n<p>decoded_text = utf8_bytes.decode(&#39;utf-8&#39;)<\/p>\n<p>print(decoded_text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u9009\u62e9\u5408\u9002\u7684\u7f16\u8f91\u5668\u548c\u7ec8\u7aef<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u786e\u4fdd\u6c49\u5b57\u80fd\u591f\u6b63\u786e\u5730\u8f93\u5165\u3001\u663e\u793a\u548c\u5904\u7406\uff0c\u4f60\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u652f\u6301Unicode\u7684\u7f16\u8f91\u5668\u548c\u7ec8\u7aef\u3002\u5927\u591a\u6570\u73b0\u4ee3\u7f16\u8f91\u5668\uff0c\u5982VSCode\u3001PyCharm\u3001Sublime Text\u7b49\uff0c\u90fd\u652f\u6301Unicode\u5b57\u7b26\uff0c\u5e76\u4e14\u53ef\u4ee5\u6b63\u786e\u663e\u793a\u6c49\u5b57\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u7f16\u8f91\u5668\u8bbe\u7f6e<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u7f16\u8f91\u5668\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u6587\u4ef6\u7f16\u7801\u4e3aUTF-8\u6765\u786e\u4fdd\u6c49\u5b57\u80fd\u591f\u88ab\u6b63\u786e\u8bc6\u522b\u548c\u663e\u793a\u3002\u5927\u591a\u6570\u7f16\u8f91\u5668\u90fd\u6709\u76f8\u5e94\u7684\u8bbe\u7f6e\u9009\u9879\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u7ec8\u7aef\u8bbe\u7f6e<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u4f7f\u7528\u547d\u4ee4\u884c\u7ec8\u7aef\u65f6\uff0c\u786e\u4fdd\u7ec8\u7aef\u652f\u6301UTF-8\u7f16\u7801\u3002\u5982\u679c\u7ec8\u7aef\u4e0d\u652f\u6301UTF-8\u7f16\u7801\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6c49\u5b57\u663e\u793a\u4e3a\u4e71\u7801\u3002\u5728Linux\u548cmacOS\u4e0a\uff0c\u9ed8\u8ba4\u7684\u7ec8\u7aef\u901a\u5e38\u652f\u6301UTF-8\uff0c\u800c\u5728Windows\u4e0a\uff0c\u53ef\u80fd\u9700\u8981\u624b\u52a8\u8bbe\u7f6e\u7ec8\u7aef\u7f16\u7801\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u5904\u7406\u6587\u4ef6\u8bfb\u5199\u4e2d\u7684\u6c49\u5b57<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5305\u542b\u6c49\u5b57\u7684\u6587\u4ef6\u65f6\uff0c\u786e\u4fdd\u6587\u4ef6\u7684\u7f16\u7801\u683c\u5f0f\u4e00\u81f4\uff0c\u901a\u5e38\u4f7f\u7528UTF-8\u7f16\u7801\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u4f7f\u7528Python\u8bfb\u53d6\u548c\u5199\u5165\u5305\u542b\u6c49\u5b57\u7684\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5199\u5165\u6587\u4ef6<\/p>\n<p>with open(&#39;chinese_text.txt&#39;, &#39;w&#39;, encoding=&#39;utf-8&#39;) as f:<\/p>\n<p>    f.write(&quot;\u4f60\u597d\uff0c\u4e16\u754c&quot;)<\/p>\n<h2><strong>\u8bfb\u53d6\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;chinese_text.txt&#39;, &#39;r&#39;, encoding=&#39;utf-8&#39;) as f:<\/p>\n<p>    content = f.read()<\/p>\n<p>    print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u5904\u7406\u7f51\u7edc\u6570\u636e\u4e2d\u7684\u6c49\u5b57<\/p>\n<\/p>\n<p><p>\u5728\u7f51\u7edc\u7f16\u7a0b\u4e2d\uff0c\u5904\u7406\u6c49\u5b57\u65f6\u4e5f\u9700\u8981\u7279\u522b\u6ce8\u610f\u5b57\u7b26\u7f16\u7801\u3002\u8bb8\u591a\u7f51\u7edc\u534f\u8bae\uff08\u5982HTTP\uff09\u5141\u8bb8\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\u3002\u5728\u53d1\u9001\u548c\u63a5\u6536\u6570\u636e\u65f6\uff0c\u786e\u4fdd\u4f7f\u7528\u6b63\u786e\u7684\u7f16\u7801\u683c\u5f0f\uff08\u901a\u5e38\u4e3aUTF-8\uff09\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u53d1\u9001\u8bf7\u6c42<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u53d1\u9001\u7f51\u7edc\u8bf7\u6c42\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bf7\u6c42\u5934\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\uff0c\u4f8b\u5982\u4f7f\u7528<code>requests<\/code>\u5e93\u65f6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>response = requests.get(&#39;http:\/\/example.com&#39;, headers={&#39;Accept-Charset&#39;: &#39;utf-8&#39;})<\/p>\n<p>print(response.text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u89e3\u6790\u54cd\u5e94<\/strong><\/li>\n<\/ol>\n<p><p>\u89e3\u6790\u54cd\u5e94\u5185\u5bb9\u65f6\uff0c\u786e\u4fdd\u4f7f\u7528\u6b63\u786e\u7684\u7f16\u7801\u683c\u5f0f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">response.encoding = &#39;utf-8&#39;<\/p>\n<p>print(response.text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u5904\u7406\u6570\u636e\u5e93\u4e2d\u7684\u6c49\u5b57<\/p>\n<\/p>\n<p><p>\u5728\u6570\u636e\u5e93\u64cd\u4f5c\u4e2d\uff0c\u5b57\u7b26\u7f16\u7801\u540c\u6837\u91cd\u8981\u3002\u786e\u4fdd\u6570\u636e\u5e93\u548c\u6570\u636e\u5e93\u8fde\u63a5\u7684\u5b57\u7b26\u96c6\u8bbe\u7f6e\u4e3aUTF-8\uff0c\u4ee5\u4fbf\u6b63\u786e\u5b58\u50a8\u548c\u68c0\u7d22\u6c49\u5b57\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u6570\u636e\u5e93\u914d\u7f6e<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u521b\u5efa\u6570\u636e\u5e93\u65f6\uff0c\u8bbe\u7f6e\u5b57\u7b26\u96c6\u4e3aUTF-8\u3002\u4f8b\u5982\uff0c\u5728MySQL\u4e2d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sql\">CREATE DATABASE mydatabase CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>Python\u6570\u636e\u5e93\u8fde\u63a5<\/strong><\/li>\n<\/ol>\n<p><p>\u4f7f\u7528Python\u8fde\u63a5\u6570\u636e\u5e93\u65f6\uff0c\u786e\u4fdd\u8fde\u63a5\u5b57\u7b26\u4e32\u6307\u5b9a\u4e86UTF-8\u7f16\u7801\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>pymysql<\/code>\u5e93\u8fde\u63a5MySQL\u6570\u636e\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pymysql<\/p>\n<p>connection = pymysql.connect(<\/p>\n<p>    host=&#39;localhost&#39;,<\/p>\n<p>    user=&#39;user&#39;,<\/p>\n<p>    password=&#39;passwd&#39;,<\/p>\n<p>    database=&#39;mydatabase&#39;,<\/p>\n<p>    charset=&#39;utf8mb4&#39;<\/p>\n<p>)<\/p>\n<p>with connection.cursor() as cursor:<\/p>\n<p>    cursor.execute(&quot;SELECT * FROM mytable&quot;)<\/p>\n<p>    for row in cursor.fetchall():<\/p>\n<p>        print(row)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6848<\/p>\n<\/p>\n<ol>\n<li><strong>\u4e71\u7801\u95ee\u9898<\/strong><\/li>\n<\/ol>\n<p><p>\u4e71\u7801\u901a\u5e38\u662f\u7531\u4e8e\u7f16\u7801\u4e0d\u4e00\u81f4\u5f15\u8d77\u7684\u3002\u786e\u4fdd\u6570\u636e\u5728\u8f93\u5165\u3001\u8f93\u51fa\u548c\u5b58\u50a8\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u4e00\u81f4\u7684\u7f16\u7801\u683c\u5f0f\uff08\u901a\u5e38\u4e3aUTF-8\uff09\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5b57\u7b26\u7f16\u7801\u9519\u8bef<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u7f16\u7801\u6216\u89e3\u7801\u8fc7\u7a0b\u4e2d\uff0c\u5982\u679c\u4f7f\u7528\u4e86\u9519\u8bef\u7684\u7f16\u7801\u683c\u5f0f\uff0c\u53ef\u80fd\u4f1a\u5f15\u53d1\u7f16\u7801\u9519\u8bef\u3002\u4f7f\u7528<code>try-except<\/code>\u5757\u6355\u83b7\u5e76\u5904\u7406\u8fd9\u4e9b\u9519\u8bef\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    decoded_text = utf8_bytes.decode(&#39;utf-8&#39;)<\/p>\n<p>except UnicodeDecodeError as e:<\/p>\n<p>    print(&quot;\u89e3\u7801\u9519\u8bef\uff1a&quot;, e)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u638c\u63e1\u4e0a\u8ff0\u6280\u672f\uff0c\u4f60\u53ef\u4ee5\u5728Python\u4e2d\u8f7b\u677e\u5904\u7406\u6c49\u5b57\uff0c\u786e\u4fdd\u6570\u636e\u5728\u5404\u79cd\u73af\u5883\u4e0b\u6b63\u786e\u663e\u793a\u548c\u64cd\u4f5c\u3002\u65e0\u8bba\u662f\u5f00\u53d1\u4e2d\u6587\u5e94\u7528\u7a0b\u5e8f\uff0c\u8fd8\u662f\u5904\u7406\u56fd\u9645\u5316\u5185\u5bb9\uff0c\u7406\u89e3\u548c\u6b63\u786e\u4f7f\u7528\u5b57\u7b26\u7f16\u7801\u90fd\u662f\u5173\u952e\u7684\u4e00\u6b65\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8f93\u51fa\u6c49\u5b57\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u8f93\u51fa\u6c49\u5b57\u975e\u5e38\u7b80\u5355\u3002\u4f60\u53ea\u9700\u786e\u4fdd\u4f60\u7684\u6e90\u4ee3\u7801\u6587\u4ef6\u4f7f\u7528UTF-8\u7f16\u7801\uff0c\u5e76\u76f4\u63a5\u5728\u4ee3\u7801\u4e2d\u8f93\u5165\u6c49\u5b57\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>print(&quot;\u4f60\u597d\uff0c\u4e16\u754c&quot;)<\/code>\u5373\u53ef\u5728\u63a7\u5236\u53f0\u8f93\u51fa\u201c\u4f60\u597d\uff0c\u4e16\u754c\u201d\u3002<\/p>\n<p><strong>\u662f\u5426\u9700\u8981\u5b89\u88c5\u7279\u5b9a\u7684\u5e93\u6765\u5904\u7406\u6c49\u5b57\uff1f<\/strong><br \/>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0cPython\u7684\u6807\u51c6\u5e93\u5df2\u7ecf\u80fd\u591f\u5904\u7406\u6c49\u5b57\uff0c\u65e0\u9700\u989d\u5916\u5b89\u88c5\u7279\u5b9a\u7684\u5e93\u3002\u7136\u800c\uff0c\u5982\u679c\u4f60\u9700\u8981\u8fdb\u884c\u66f4\u590d\u6742\u7684\u6587\u672c\u5904\u7406\uff0c\u5982\u5206\u8bcd\u3001\u60c5\u611f\u5206\u6790\u7b49\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u50cf<code>jieba<\/code>\u8fd9\u6837\u7684\u7b2c\u4e09\u65b9\u5e93\u6765\u5904\u7406\u6c49\u5b57\u6587\u672c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u6c49\u5b57\u5b57\u7b26\u4e32\u7684\u7f16\u7801\u95ee\u9898\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u9ed8\u8ba4\u4f7f\u7528Unicode\u7f16\u7801\uff0c\u8fd9\u610f\u5473\u7740\u6c49\u5b57\u53ef\u4ee5\u76f4\u63a5\u5904\u7406\u3002\u4f46\u5728\u4e0e\u5916\u90e8\u6587\u4ef6\u6216\u7f51\u7edc\u6570\u636e\u4ea4\u4e92\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u660e\u786e\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\u3002\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7<code>encoding=&#39;utf-8&#39;<\/code>\u6765\u786e\u4fdd\u6b63\u786e\u8bfb\u53d6\u548c\u5199\u5165\u6c49\u5b57\u6587\u672c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u7684\u56fe\u5f62\u754c\u9762\u4e2d\u663e\u793a\u6c49\u5b57\uff1f<\/strong><br \/>\u5728\u4f7f\u7528\u50cf<code>Tkinter<\/code>\u6216<code>PyQt<\/code>\u7b49\u56fe\u5f62\u754c\u9762\u5e93\u65f6\uff0c\u6c49\u5b57\u4e5f\u80fd\u591f\u6b63\u5e38\u663e\u793a\u3002\u53ea\u9700\u5728\u521b\u5efa\u6587\u672c\u6216\u6807\u7b7e\u65f6\uff0c\u5c06\u6c49\u5b57\u4f5c\u4e3a\u5b57\u7b26\u4e32\u4f20\u5165\u5373\u53ef\u3002\u4f8b\u5982\uff0c\u5728<code>Tkinter<\/code>\u4e2d\u53ef\u4ee5\u4f7f\u7528<code>label = Label(root, text=&quot;\u4f60\u597d&quot;)<\/code>\u6765\u663e\u793a\u6c49\u5b57\u3002\u786e\u4fdd\u4f60\u7684\u73af\u5883\u652f\u6301UTF-8\u7f16\u7801\uff0c\u4ee5\u907f\u514d\u4e71\u7801\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5199\u6c49\u5b57\u4e3b\u8981\u6d89\u53ca\u5230\u5b57\u7b26\u7f16\u7801\u7684\u95ee\u9898\u3002Python\u4e2d\u4f7f\u7528Unicode\u5b57\u7b26\u7f16\u7801\u6765\u8868\u793a\u6c49\u5b57\u3001\u901a\u8fc7\u5b57\u7b26\u4e32 [&hellip;]","protected":false},"author":3,"featured_media":1011104,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1011095"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1011095"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1011095\/revisions"}],"predecessor-version":[{"id":1011107,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1011095\/revisions\/1011107"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1011104"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1011095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1011095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1011095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}