{"id":963596,"date":"2024-12-27T04:19:45","date_gmt":"2024-12-26T20:19:45","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/963596.html"},"modified":"2024-12-27T04:19:47","modified_gmt":"2024-12-26T20:19:47","slug":"python%e5%a6%82%e4%bd%95%e4%b8%8b%e8%bd%bdjson%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/963596.html","title":{"rendered":"python\u5982\u4f55\u4e0b\u8f7djson\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24180818\/1fe0266d-8117-427f-87ef-c157e517cfce.webp\" alt=\"python\u5982\u4f55\u4e0b\u8f7djson\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u4e0b\u8f7dJSON\u6587\u4ef6\u53ef\u4ee5\u901a\u8fc7\u8bf7\u6c42\u5e93\u3001urllib\u5e93\u3001\u4f7f\u7528API\u63a5\u53e3\u7b49\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0<\/strong>\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528Python\u7684requests\u5e93\uff0c\u56e0\u4e3a\u5b83\u7b80\u5355\u6613\u7528\u5e76\u4e14\u529f\u80fd\u5f3a\u5927\u3002\u6b64\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528Python\u5185\u7f6e\u7684urllib\u5e93\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63a2\u8ba8\u5982\u4f55\u5904\u7406\u4e0b\u8f7d\u4e0b\u6765\u7684JSON\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528REQUESTS\u5e93\u4e0b\u8f7dJSON\u6587\u4ef6<\/p>\n<\/p>\n<p><p>requests\u5e93\u662f\u4e00\u4e2a\u7528\u4e8e\u53d1\u9001HTTP\u8bf7\u6c42\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u4fbf\u6377\u7684\u65b9\u6cd5\u6765\u5904\u7406HTTP\u8bf7\u6c42\u548c\u54cd\u5e94\u3002\u4f7f\u7528requests\u5e93\u4e0b\u8f7dJSON\u6587\u4ef6\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5requests\u5e93<\/strong>\uff1a\u9996\u5148\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u4f60\u7684Python\u73af\u5883\u4e2d\u5b89\u88c5\u4e86requests\u5e93\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53d1\u9001HTTP\u8bf7\u6c42<\/strong>\uff1a\u4f7f\u7528requests\u5e93\u53d1\u9001HTTP GET\u8bf7\u6c42\u83b7\u53d6JSON\u6587\u4ef6\u3002\u4f60\u9700\u8981\u6307\u5b9a\u6587\u4ef6\u7684URL\u5730\u5740\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u6790JSON\u54cd\u5e94<\/strong>\uff1a\u4e00\u65e6\u6536\u5230\u54cd\u5e94\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u54cd\u5e94\u5bf9\u8c61\u7684<code>.json()<\/code>\u65b9\u6cd5\u76f4\u63a5\u89e3\u6790\u4e3aPython\u5b57\u5178\u6216\u5217\u8868\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58JSON\u6587\u4ef6<\/strong>\uff1a\u5c06\u89e3\u6790\u540e\u7684\u6570\u636e\u4fdd\u5b58\u4e3a\u672c\u5730JSON\u6587\u4ef6\uff0c\u4ee5\u4fbf\u540e\u7eed\u5904\u7406\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>import json<\/p>\n<p>def download_json(url, file_path):<\/p>\n<p>    try:<\/p>\n<p>        # \u53d1\u9001HTTP GET\u8bf7\u6c42<\/p>\n<p>        response = requests.get(url)<\/p>\n<p>        # \u68c0\u67e5\u54cd\u5e94\u72b6\u6001\u7801<\/p>\n<p>        response.r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se_for_status()<\/p>\n<p>        # \u89e3\u6790JSON\u6570\u636e<\/p>\n<p>        json_data = response.json()<\/p>\n<p>        # \u4fdd\u5b58\u4e3a\u672c\u5730JSON\u6587\u4ef6<\/p>\n<p>        with open(file_path, &#39;w&#39;) as json_file:<\/p>\n<p>            json.dump(json_data, json_file, indent=4)<\/p>\n<p>        print(f&quot;JSON\u6587\u4ef6\u5df2\u4fdd\u5b58\u81f3 {file_path}&quot;)<\/p>\n<p>    except requests.exceptions.RequestException as e:<\/p>\n<p>        print(f&quot;\u8bf7\u6c42\u5931\u8d25: {e}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>url = &quot;https:\/\/api.example.com\/data.json&quot;<\/p>\n<p>file_path = &quot;data.json&quot;<\/p>\n<p>download_json(url, file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528URLLIB\u5e93\u4e0b\u8f7dJSON\u6587\u4ef6<\/p>\n<\/p>\n<p><p>urllib\u662fPython\u5185\u7f6e\u7684HTTP\u8bf7\u6c42\u5e93\uff0c\u53ef\u7528\u4e8e\u4e0b\u8f7dJSON\u6587\u4ef6\u3002\u867d\u7136\u5b83\u6bd4requests\u5e93\u7a0d\u663e\u590d\u6742\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5bfc\u5165\u5e93<\/strong>\uff1a\u4f7f\u7528urllib.request\u6a21\u5757\u53d1\u9001HTTP\u8bf7\u6c42\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53d1\u9001\u8bf7\u6c42\u5e76\u8bfb\u53d6\u54cd\u5e94<\/strong>\uff1a\u4f7f\u7528urlopen\u65b9\u6cd5\u53d1\u9001\u8bf7\u6c42\u5e76\u8bfb\u53d6\u54cd\u5e94\u6570\u636e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u6790JSON\u6570\u636e<\/strong>\uff1a\u4f7f\u7528json\u6a21\u5757\u52a0\u8f7d\u6570\u636e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58JSON\u6587\u4ef6<\/strong>\uff1a\u5c06\u89e3\u6790\u540e\u7684\u6570\u636e\u4fdd\u5b58\u4e3a\u672c\u5730\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import urllib.request<\/p>\n<p>import json<\/p>\n<p>def download_json_with_urllib(url, file_path):<\/p>\n<p>    try:<\/p>\n<p>        # \u53d1\u9001\u8bf7\u6c42\u5e76\u8bfb\u53d6\u54cd\u5e94<\/p>\n<p>        with urllib.request.urlopen(url) as response:<\/p>\n<p>            data = response.read()<\/p>\n<p>            # \u89e3\u6790JSON\u6570\u636e<\/p>\n<p>            json_data = json.loads(data)<\/p>\n<p>            # \u4fdd\u5b58\u4e3a\u672c\u5730JSON\u6587\u4ef6<\/p>\n<p>            with open(file_path, &#39;w&#39;) as json_file:<\/p>\n<p>                json.dump(json_data, json_file, indent=4)<\/p>\n<p>        print(f&quot;JSON\u6587\u4ef6\u5df2\u4fdd\u5b58\u81f3 {file_path}&quot;)<\/p>\n<p>    except urllib.error.URLError as e:<\/p>\n<p>        print(f&quot;\u8bf7\u6c42\u5931\u8d25: {e}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>url = &quot;https:\/\/api.example.com\/data.json&quot;<\/p>\n<p>file_path = &quot;data.json&quot;<\/p>\n<p>download_json_with_urllib(url, file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528API\u63a5\u53e3\u4e0b\u8f7dJSON\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u8bb8\u591aWeb\u670d\u52a1\u63d0\u4f9bAPI\u63a5\u53e3\uff0c\u5141\u8bb8\u7528\u6237\u4ee5JSON\u683c\u5f0f\u83b7\u53d6\u6570\u636e\u3002\u4f7f\u7528\u8fd9\u4e9b\u63a5\u53e3\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u4e0b\u8f7d\u6240\u9700\u7684JSON\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e86\u89e3API\u6587\u6863<\/strong>\uff1a\u5728\u4f7f\u7528API\u63a5\u53e3\u4e4b\u524d\uff0c\u9605\u8bfbAPI\u6587\u6863\u4ee5\u4e86\u89e3\u8bf7\u6c42URL\u3001\u53c2\u6570\u548c\u54cd\u5e94\u683c\u5f0f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53d1\u9001\u8bf7\u6c42\u83b7\u53d6\u6570\u636e<\/strong>\uff1a\u4f7f\u7528requests\u5e93\u6216urllib\u5e93\u53d1\u9001\u8bf7\u6c42\uff0c\u83b7\u53d6JSON\u54cd\u5e94\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u6790\u548c\u4fdd\u5b58\u6570\u636e<\/strong>\uff1a\u89e3\u6790\u54cd\u5e94\u6570\u636e\u5e76\u4fdd\u5b58\u4e3a\u672c\u5730\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>import json<\/p>\n<p>def download_json_from_api(api_url, params, file_path):<\/p>\n<p>    try:<\/p>\n<p>        # \u53d1\u9001HTTP\u8bf7\u6c42<\/p>\n<p>        response = requests.get(api_url, params=params)<\/p>\n<p>        # \u68c0\u67e5\u54cd\u5e94\u72b6\u6001\u7801<\/p>\n<p>        response.raise_for_status()<\/p>\n<p>        # \u89e3\u6790JSON\u6570\u636e<\/p>\n<p>        json_data = response.json()<\/p>\n<p>        # \u4fdd\u5b58\u4e3a\u672c\u5730JSON\u6587\u4ef6<\/p>\n<p>        with open(file_path, &#39;w&#39;) as json_file:<\/p>\n<p>            json.dump(json_data, json_file, indent=4)<\/p>\n<p>        print(f&quot;JSON\u6587\u4ef6\u5df2\u4fdd\u5b58\u81f3 {file_path}&quot;)<\/p>\n<p>    except requests.exceptions.RequestException as e:<\/p>\n<p>        print(f&quot;\u8bf7\u6c42\u5931\u8d25: {e}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>api_url = &quot;https:\/\/api.example.com\/data&quot;<\/p>\n<p>params = {&quot;key1&quot;: &quot;value1&quot;, &quot;key2&quot;: &quot;value2&quot;}<\/p>\n<p>file_path = &quot;data.json&quot;<\/p>\n<p>download_json_from_api(api_url, params, file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u5904\u7406\u4e0b\u8f7d\u7684JSON\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u4e0b\u8f7d\u548c\u4fdd\u5b58JSON\u6587\u4ef6\u540e\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u8fdb\u4e00\u6b65\u5904\u7406\u8fd9\u4e9b\u6570\u636e\u3002\u4f8b\u5982\uff0c\u63d0\u53d6\u7279\u5b9a\u5b57\u6bb5\u3001\u8f6c\u6362\u6570\u636e\u7ed3\u6784\u6216\u5c06\u6570\u636e\u5bfc\u5165\u6570\u636e\u5e93\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u5904\u7406\u65b9\u5f0f\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bfb\u53d6JSON\u6587\u4ef6<\/strong>\uff1a\u4f7f\u7528json\u6a21\u5757\u8bfb\u53d6\u672c\u5730JSON\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u6790\u548c\u64cd\u4f5c\u6570\u636e<\/strong>\uff1a\u6839\u636e\u9700\u8981\u63d0\u53d6\u548c\u4fee\u6539\u6570\u636e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6570\u636e\u5b58\u50a8<\/strong>\uff1a\u5c06\u5904\u7406\u540e\u7684\u6570\u636e\u5b58\u50a8\u5230\u6570\u636e\u5e93\u6216\u5176\u4ed6\u5b58\u50a8\u4ecb\u8d28\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import json<\/p>\n<p>def process_json_file(file_path):<\/p>\n<p>    try:<\/p>\n<p>        # \u8bfb\u53d6JSON\u6587\u4ef6<\/p>\n<p>        with open(file_path, &#39;r&#39;) as json_file:<\/p>\n<p>            json_data = json.load(json_file)<\/p>\n<p>        # \u793a\u4f8b\uff1a\u63d0\u53d6\u7279\u5b9a\u5b57\u6bb5\u5e76\u6253\u5370<\/p>\n<p>        for item in json_data:<\/p>\n<p>            print(item.get(&#39;field_name&#39;))<\/p>\n<p>    except FileNotFoundError:<\/p>\n<p>        print(f&quot;\u6587\u4ef6\u672a\u627e\u5230: {file_path}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>file_path = &quot;data.json&quot;<\/p>\n<p>process_json_file(file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u603b\u7ed3<\/strong>\uff1a\u5728Python\u4e2d\u4e0b\u8f7dJSON\u6587\u4ef6\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0crequests\u5e93\u662f\u6700\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u56e0\u5176\u7b80\u5355\u548c\u529f\u80fd\u5f3a\u5927\u3002\u9664\u6b64\u4e4b\u5916\uff0curllib\u5e93\u548cAPI\u63a5\u53e3\u4e5f\u662f\u4e0d\u9519\u7684\u9009\u62e9\u3002\u4e0b\u8f7dJSON\u6587\u4ef6\u540e\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u4e00\u6b65\u5904\u7406\u6570\u636e\uff0c\u4ee5\u6ee1\u8db3\u7279\u5b9a\u7684\u5e94\u7528\u9700\u6c42\u3002\u901a\u8fc7\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u83b7\u53d6\u548c\u5904\u7406JSON\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u53d1\u9001\u8bf7\u6c42\u4ee5\u4e0b\u8f7dJSON\u6587\u4ef6\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>requests<\/code>\u5e93\u53d1\u9001HTTP\u8bf7\u6c42\u5e76\u4e0b\u8f7dJSON\u6587\u4ef6\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86requests\u5e93\u3002\u4f7f\u7528<code>requests.get()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u83b7\u53d6\u76ee\u6807URL\u7684\u5185\u5bb9\uff0c\u7136\u540e\u8c03\u7528<code>.json()<\/code>\u65b9\u6cd5\u5c06\u5176\u89e3\u6790\u4e3aPython\u5b57\u5178\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">import requests\n\nurl = &#39;http:\/\/example.com\/data.json&#39;\nresponse = requests.get(url)\n\nif response.status_code == 200:\n    data = response.json()\n    print(data)\nelse:\n    print(&#39;\u4e0b\u8f7d\u5931\u8d25\uff0c\u72b6\u6001\u7801:&#39;, response.status_code)\n<\/code><\/pre>\n<p><strong>\u6211\u5e94\u8be5\u5982\u4f55\u5904\u7406\u4e0b\u8f7d\u7684JSON\u6587\u4ef6\uff1f<\/strong><br \/>\u4e0b\u8f7d\u540e\u7684JSON\u6570\u636e\u901a\u5e38\u4ee5\u5b57\u5178\u6216\u5217\u8868\u7684\u5f62\u5f0f\u5b58\u5728\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5185\u7f6e\u529f\u80fd\u5bf9\u5176\u8fdb\u884c\u5904\u7406\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u904d\u5386\u5b57\u5178\u4e2d\u7684\u952e\u503c\u5bf9\u6216\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c\u8fdb\u884c\u6570\u636e\u5206\u6790\u6216\u5b58\u50a8\u5230\u6570\u636e\u5e93\u4e2d\u3002\u4f7f\u7528<code>json<\/code>\u6a21\u5757\u5c06\u5176\u4fdd\u5b58\u4e3a\u6587\u4ef6\u4e5f\u5f88\u7b80\u5355\uff1a<\/p>\n<pre><code class=\"language-python\">import json\n\nwith open(&#39;data.json&#39;, &#39;w&#39;) as json_file:\n    json.dump(data, json_file)\n<\/code><\/pre>\n<p><strong>\u4e0b\u8f7dJSON\u6587\u4ef6\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u54ea\u4e9b\u9519\u8bef\u53ca\u5982\u4f55\u89e3\u51b3\uff1f<\/strong><br \/>\u5728\u4e0b\u8f7dJSON\u6587\u4ef6\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u9519\u8bef\uff0c\u4f8b\u5982\u7f51\u7edc\u8fde\u63a5\u95ee\u9898\u3001\u6587\u4ef6\u4e0d\u5b58\u5728\u6216\u670d\u52a1\u5668\u8fd4\u56de\u9519\u8bef\u7b49\u3002\u5904\u7406\u8fd9\u4e9b\u95ee\u9898\u7684\u65b9\u6cd5\u5305\u62ec\u68c0\u67e5URL\u662f\u5426\u6b63\u786e\u3001\u4f7f\u7528\u5f02\u5e38\u5904\u7406\u6765\u6355\u83b7\u53ef\u80fd\u7684\u9519\u8bef\u3001\u4ee5\u53ca\u67e5\u770bHTTP\u54cd\u5e94\u72b6\u6001\u7801\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528<code>response.raise_for_status()<\/code>\u6765\u629b\u51faHTTP\u9519\u8bef\uff1a<\/p>\n<pre><code class=\"language-python\">try:\n    response.raise_for_status()\n    data = response.json()\nexcept requests.exceptions.HTTPError as err:\n    print(&#39;HTTP\u9519\u8bef:&#39;, err)\nexcept requests.exceptions.RequestException as err:\n    print(&#39;\u8bf7\u6c42\u9519\u8bef:&#39;, err)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u4e0b\u8f7dJSON\u6587\u4ef6\u53ef\u4ee5\u901a\u8fc7\u8bf7\u6c42\u5e93\u3001urllib\u5e93\u3001\u4f7f\u7528API\u63a5\u53e3\u7b49\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684 [&hellip;]","protected":false},"author":3,"featured_media":963601,"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\/963596"}],"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=963596"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/963596\/revisions"}],"predecessor-version":[{"id":963604,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/963596\/revisions\/963604"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/963601"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=963596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=963596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=963596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}