{"id":928527,"date":"2024-12-26T16:37:09","date_gmt":"2024-12-26T08:37:09","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/928527.html"},"modified":"2024-12-26T16:37:11","modified_gmt":"2024-12-26T08:37:11","slug":"python%e5%a6%82%e4%bd%95%e4%bf%9d%e5%ad%98json","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/928527.html","title":{"rendered":"python\u5982\u4f55\u4fdd\u5b58json"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25064137\/1208a484-d9cb-4f0c-852d-8c9e99ed2953.webp\" alt=\"python\u5982\u4f55\u4fdd\u5b58json\" \/><\/p>\n<p><p> <strong>Python\u4fdd\u5b58JSON\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528\u5185\u7f6e\u7684<code>json<\/code>\u6a21\u5757\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<code>simplejson<\/code>\u3001\u901a\u8fc7\u6587\u4ef6\u64cd\u4f5c\u4fdd\u5b58JSON\u3002<\/strong>\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\u5b9e\u73b0JSON\u6570\u636e\u7684\u4fdd\u5b58\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528\u5185\u7f6e\u7684<code>json<\/code>\u6a21\u5757<\/p>\n<\/p>\n<p><p>Python\u7684\u5185\u7f6e<code>json<\/code>\u6a21\u5757\u662f\u5904\u7406JSON\u6570\u636e\u7684\u4e3b\u8981\u5de5\u5177\u3002\u4f7f\u7528<code>json.dump()<\/code>\u51fd\u6570\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06Python\u5bf9\u8c61\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u5e76\u5199\u5165\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<ol>\n<li>\u8bfb\u53d6\u548c\u4fdd\u5b58JSON\u6570\u636e<\/li>\n<\/ol>\n<p><p>\u8981\u4fdd\u5b58JSON\u6570\u636e\uff0c\u9996\u5148\u9700\u8981\u5c06Python\u5bf9\u8c61\uff08\u5982\u5b57\u5178\u6216\u5217\u8868\uff09\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u3002<code>json<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86<code>json.dumps()<\/code>\u548c<code>json.dump()<\/code>\u4e24\u4e2a\u4e3b\u8981\u51fd\u6570\u6765\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002<\/p>\n<\/p>\n<ul>\n<li><code>json.dumps()<\/code>\uff1a\u5c06Python\u5bf9\u8c61\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u3002<\/li>\n<li><code>json.dump()<\/code>\uff1a\u5c06Python\u5bf9\u8c61\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u5e76\u76f4\u63a5\u5199\u5165\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-python\">import json<\/p>\n<h2><strong>\u5b9a\u4e49\u4e00\u4e2aPython\u5b57\u5178<\/strong><\/h2>\n<p>data = {<\/p>\n<p>    &#39;name&#39;: &#39;Alice&#39;,<\/p>\n<p>    &#39;age&#39;: 30,<\/p>\n<p>    &#39;city&#39;: &#39;New York&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u5c06\u5b57\u5178\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u5e76\u6253\u5370<\/strong><\/h2>\n<p>json_str = json.dumps(data, indent=4)<\/p>\n<p>print(json_str)<\/p>\n<h2><strong>\u5c06\u5b57\u5178\u4fdd\u5b58\u4e3aJSON\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;data.json&#39;, &#39;w&#39;) as f:<\/p>\n<p>    json.dump(data, f, indent=4)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>json.dumps()<\/code>\u51fd\u6570\u7528\u4e8e\u5c06\u5b57\u5178<code>data<\/code>\u8f6c\u6362\u4e3a\u683c\u5f0f\u5316\u7684JSON\u5b57\u7b26\u4e32\uff0c\u5e76\u6253\u5370\u8f93\u51fa\u3002<code>json.dump()<\/code>\u51fd\u6570\u5219\u7528\u4e8e\u5c06\u5b57\u5178\u76f4\u63a5\u4fdd\u5b58\u5230\u6587\u4ef6<code>data.json<\/code>\u4e2d\u3002<code>indent<\/code>\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u7f29\u8fdb\u7ea7\u522b\uff0c\u4ee5\u4fbf\u63d0\u9ad8\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u5904\u7406\u590d\u6742\u6570\u636e\u7c7b\u578b<\/li>\n<\/ol>\n<p><p>\u6709\u65f6\u5019\uff0cPython\u5bf9\u8c61\u53ef\u80fd\u5305\u542b\u590d\u6742\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5982\u65e5\u671f\u3001\u96c6\u5408\u7b49\uff0c\u8fd9\u4e9b\u7c7b\u578b\u4e0d\u80fd\u76f4\u63a5\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u7f16\u7801\u5668\u6765\u5904\u7406\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from datetime import datetime<\/p>\n<p>import json<\/p>\n<h2><strong>\u81ea\u5b9a\u4e49JSON\u7f16\u7801\u5668<\/strong><\/h2>\n<p>class CustomEncoder(json.JSONEncoder):<\/p>\n<p>    def default(self, obj):<\/p>\n<p>        if isinstance(obj, datetime):<\/p>\n<p>            return obj.isoformat()<\/p>\n<p>        return super().default(obj)<\/p>\n<h2><strong>\u542b\u6709\u65e5\u671f\u5bf9\u8c61\u7684\u5b57\u5178<\/strong><\/h2>\n<p>data = {<\/p>\n<p>    &#39;name&#39;: &#39;Bob&#39;,<\/p>\n<p>    &#39;date_joined&#39;: datetime.now()<\/p>\n<p>}<\/p>\n<h2><strong>\u4f7f\u7528\u81ea\u5b9a\u4e49\u7f16\u7801\u5668\u4fdd\u5b58\u4e3aJSON<\/strong><\/h2>\n<p>with open(&#39;data_with_date.json&#39;, &#39;w&#39;) as f:<\/p>\n<p>    json.dump(data, f, indent=4, cls=CustomEncoder)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u5b9a\u4e49\u4e86\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684JSON\u7f16\u7801\u5668<code>CustomEncoder<\/code>\uff0c\u7528\u4e8e\u5c06<code>datetime<\/code>\u5bf9\u8c61\u8f6c\u6362\u4e3aISO 8601\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u3002\u4f7f\u7528\u8be5\u7f16\u7801\u5668\u53ef\u4ee5\u6210\u529f\u4fdd\u5b58\u5305\u542b\u65e5\u671f\u5bf9\u8c61\u7684\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93<code>simplejson<\/code><\/p>\n<\/p>\n<p><p><code>simplejson<\/code>\u662fPython\u7684\u4e00\u4e2a\u7b2c\u4e09\u65b9\u5e93\uff0c\u4e13\u95e8\u7528\u4e8e\u5904\u7406JSON\u6570\u636e\u3002\u4e0e\u5185\u7f6e\u7684<code>json<\/code>\u6a21\u5757\u76f8\u6bd4\uff0c<code>simplejson<\/code>\u901a\u5e38\u5177\u6709\u66f4\u597d\u7684\u6027\u80fd\u548c\u66f4\u591a\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5<code>simplejson<\/code><\/li>\n<\/ol>\n<p><p>\u9996\u5148\u9700\u8981\u5b89\u88c5<code>simplejson<\/code>\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pip<\/code>\u5de5\u5177\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install simplejson<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u4f7f\u7528<code>simplejson<\/code>\u4fdd\u5b58JSON\u6570\u636e<\/li>\n<\/ol>\n<p><p><code>simplejson<\/code>\u5e93\u63d0\u4f9b\u4e86\u4e0e\u5185\u7f6e<code>json<\/code>\u6a21\u5757\u7c7b\u4f3c\u7684\u63a5\u53e3\uff0c\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u7528\u4e8e\u4fdd\u5b58JSON\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import simplejson as json<\/p>\n<h2><strong>\u5b9a\u4e49\u4e00\u4e2aPython\u5b57\u5178<\/strong><\/h2>\n<p>data = {<\/p>\n<p>    &#39;name&#39;: &#39;Charlie&#39;,<\/p>\n<p>    &#39;age&#39;: 25,<\/p>\n<p>    &#39;city&#39;: &#39;San Francisco&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u5c06\u5b57\u5178\u4fdd\u5b58\u4e3aJSON\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;simple_data.json&#39;, &#39;w&#39;) as f:<\/p>\n<p>    json.dump(data, f, indent=4)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>simplejson<\/code>\u5e93\u7684\u4f7f\u7528\u65b9\u5f0f\u4e0e\u5185\u7f6e<code>json<\/code>\u6a21\u5757\u51e0\u4e4e\u76f8\u540c\uff0c\u53ef\u4ee5\u76f4\u63a5\u66ff\u6362\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u901a\u8fc7\u6587\u4ef6\u64cd\u4f5c\u4fdd\u5b58JSON<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u4f7f\u7528\u5185\u7f6e\u7684<code>json<\/code>\u6a21\u5757\u548c\u7b2c\u4e09\u65b9\u5e93<code>simplejson<\/code>\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u64cd\u4f5c\u6587\u4ef6\u7684\u65b9\u5f0f\u4fdd\u5b58JSON\u6570\u636e\u3002\u8fd9\u79cd\u65b9\u6cd5\u901a\u5e38\u7528\u4e8e\u9700\u8981\u5bf9\u6587\u4ef6\u8fdb\u884c\u66f4\u591a\u63a7\u5236\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<ol>\n<li>\u624b\u52a8\u8f6c\u6362\u6570\u636e<\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u624b\u52a8\u5c06Python\u5bf9\u8c61\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u4f7f\u7528\u6587\u4ef6\u64cd\u4f5c\u5c06\u5176\u5199\u5165\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<h2><strong>\u5b9a\u4e49\u4e00\u4e2aPython\u5b57\u5178<\/strong><\/h2>\n<p>data = {<\/p>\n<p>    &#39;name&#39;: &#39;Diana&#39;,<\/p>\n<p>    &#39;age&#39;: 28,<\/p>\n<p>    &#39;city&#39;: &#39;Los Angeles&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u624b\u52a8\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u7684\u5b57\u7b26\u4e32<\/strong><\/h2>\n<p>json_str = json.dumps(data, indent=4)<\/p>\n<h2><strong>\u624b\u52a8\u5199\u5165\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;manual_data.json&#39;, &#39;w&#39;) as f:<\/p>\n<p>    f.write(json_str)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u9996\u5148\u4f7f\u7528<code>json.dumps()<\/code>\u51fd\u6570\u5c06\u5b57\u5178\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u4f7f\u7528\u6587\u4ef6\u5199\u64cd\u4f5c\u5c06\u5b57\u7b26\u4e32\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u7ba1\u7406\u6587\u4ef6\u64cd\u4f5c<\/li>\n<\/ol>\n<p><p>\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u6587\u4ef6\u7684\u6253\u5f00\u548c\u5173\u95ed\uff0c\u786e\u4fdd\u6587\u4ef6\u5728\u4f7f\u7528\u540e\u6b63\u786e\u5173\u95ed\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<h2><strong>\u5b9a\u4e49\u4e00\u4e2aPython\u5b57\u5178<\/strong><\/h2>\n<p>data = {<\/p>\n<p>    &#39;name&#39;: &#39;Eve&#39;,<\/p>\n<p>    &#39;age&#39;: 32,<\/p>\n<p>    &#39;city&#39;: &#39;Chicago&#39;<\/p>\n<p>}<\/p>\n<h2><strong>\u5c06\u5b57\u5178\u8f6c\u6362\u4e3aJSON\u683c\u5f0f\u7684\u5b57\u7b26\u4e32<\/strong><\/h2>\n<p>json_str = json.dumps(data, indent=4)<\/p>\n<h2><strong>\u4f7f\u7528with\u8bed\u53e5\u5199\u5165\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;with_statement_data.json&#39;, &#39;w&#39;) as f:<\/p>\n<p>    f.write(json_str)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u4f7f\u7528<code>with<\/code>\u8bed\u53e5\u7b80\u5316\u4e86\u6587\u4ef6\u64cd\u4f5c\uff0c\u907f\u514d\u4e86\u5728\u64cd\u4f5c\u5b8c\u6210\u540e\u624b\u52a8\u5173\u95ed\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3<\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u4fdd\u5b58JSON\u6570\u636e\uff0c\u5305\u62ec\u4f7f\u7528\u5185\u7f6e\u7684<code>json<\/code>\u6a21\u5757\u3001\u7b2c\u4e09\u65b9\u5e93<code>simplejson<\/code>\u4ee5\u53ca\u76f4\u63a5\u7684\u6587\u4ef6\u64cd\u4f5c\u3002\u5728\u9009\u62e9\u65b9\u6cd5\u65f6\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u548c\u6570\u636e\u590d\u6742\u6027\u8fdb\u884c\u9009\u62e9\u3002\u5bf9\u4e8e\u5927\u591a\u6570\u5e94\u7528\u573a\u666f\uff0c\u5185\u7f6e\u7684<code>json<\/code>\u6a21\u5757\u5df2\u7ecf\u8db3\u591f\u5f3a\u5927\uff0c\u800c<code>simplejson<\/code>\u53ef\u4ee5\u5728\u9700\u8981\u66f4\u9ad8\u6027\u80fd\u65f6\u4f5c\u4e3a\u66ff\u4ee3\u3002\u901a\u8fc7\u81ea\u5b9a\u4e49\u7f16\u7801\u5668\u548c\u624b\u52a8\u6587\u4ef6\u64cd\u4f5c\uff0c\u4e5f\u53ef\u4ee5\u5904\u7406\u66f4\u590d\u6742\u7684\u6570\u636e\u7c7b\u578b\u548c\u6587\u4ef6\u64cd\u4f5c\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8bfb\u53d6\u548c\u4fdd\u5b58JSON\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u4f7f\u7528\u5185\u7f6e\u7684<code>json<\/code>\u6a21\u5757\u53ef\u4ee5\u8f7b\u677e\u8bfb\u53d6\u548c\u4fdd\u5b58JSON\u6587\u4ef6\u3002\u9996\u5148\uff0c\u4f7f\u7528<code>json.load()<\/code>\u65b9\u6cd5\u8bfb\u53d6JSON\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3aPython\u5bf9\u8c61\uff1b\u7136\u540e\uff0c\u53ef\u4ee5\u5bf9\u8be5\u5bf9\u8c61\u8fdb\u884c\u64cd\u4f5c\u3002\u4fdd\u5b58\u65f6\uff0c\u4f7f\u7528<code>json.dump()<\/code>\u65b9\u6cd5\u5c06Python\u5bf9\u8c61\u5199\u5165\u5230JSON\u6587\u4ef6\u4e2d\u3002\u786e\u4fdd\u5728\u5199\u5165\u65f6\u4f7f\u7528\u9002\u5f53\u7684\u6587\u4ef6\u6a21\u5f0f\uff08\u5982<code>&#39;w&#39;<\/code>\uff09\u6765\u907f\u514d\u8986\u76d6\u73b0\u6709\u6570\u636e\u3002<\/p>\n<p><strong>Python\u4fdd\u5b58JSON\u65f6\u5982\u4f55\u683c\u5f0f\u5316\u8f93\u51fa\uff1f<\/strong><br \/>\u5728\u4f7f\u7528<code>json.dump()<\/code>\u6216<code>json.dumps()<\/code>\u65b9\u6cd5\u65f6\uff0c\u53ef\u4ee5\u5229\u7528<code>indent<\/code>\u53c2\u6570\u6765\u5b9e\u73b0\u683c\u5f0f\u5316\u8f93\u51fa\u3002\u901a\u8fc7\u8bbe\u7f6e<code>indent<\/code>\u7684\u503c\uff0c\u53ef\u4ee5\u63a7\u5236\u8f93\u51faJSON\u7684\u7f29\u8fdb\u5c42\u7ea7\uff0c\u4ece\u800c\u4f7f\u5f97\u751f\u6210\u7684JSON\u6587\u4ef6\u66f4\u52a0\u53ef\u8bfb\u3002\u4f8b\u5982\uff0c\u8bbe\u7f6e<code>indent=4<\/code>\u5c06\u4f7f\u6bcf\u4e2a\u5c42\u7ea7\u7f29\u8fdb4\u4e2a\u7a7a\u683c\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u5904\u7406JSON\u7f16\u7801\u9519\u8bef\uff1f<\/strong><br \/>\u5904\u7406JSON\u7f16\u7801\u9519\u8bef\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u53ef\u80fd\u51fa\u73b0\u7684\u5f02\u5e38\u3002\u5e38\u89c1\u7684\u9519\u8bef\u5305\u62ec<code>JSONDecodeError<\/code>\uff0c\u8fd9\u901a\u5e38\u662f\u7531\u4e8e\u8f93\u5165\u6570\u636e\u683c\u5f0f\u4e0d\u6b63\u786e\u5f15\u8d77\u7684\u3002\u901a\u8fc7\u6355\u83b7\u8fd9\u4e9b\u5f02\u5e38\uff0c\u53ef\u4ee5\u63d0\u4f9b\u66f4\u53cb\u597d\u7684\u9519\u8bef\u63d0\u793a\uff0c\u5e2e\u52a9\u7528\u6237\u4e86\u89e3\u95ee\u9898\u6240\u5728\u5e76\u8fdb\u884c\u4fee\u6b63\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4fdd\u5b58JSON\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528\u5185\u7f6e\u7684json\u6a21\u5757\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93simplejson\u3001\u901a\u8fc7\u6587\u4ef6\u64cd\u4f5c\u4fdd\u5b58J [&hellip;]","protected":false},"author":3,"featured_media":928533,"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\/928527"}],"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=928527"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/928527\/revisions"}],"predecessor-version":[{"id":928537,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/928527\/revisions\/928537"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/928533"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=928527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=928527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=928527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}