{"id":1038011,"date":"2024-12-31T12:20:12","date_gmt":"2024-12-31T04:20:12","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1038011.html"},"modified":"2024-12-31T12:20:15","modified_gmt":"2024-12-31T04:20:15","slug":"python%e6%96%87%e4%bb%b6%e8%b7%af%e5%be%84%e5%a6%82%e4%bd%95%e8%bf%94%e5%9b%9e%e6%96%87%e4%bb%b6%e5%86%85%e5%ae%b9","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1038011.html","title":{"rendered":"python\u6587\u4ef6\u8def\u5f84\u5982\u4f55\u8fd4\u56de\u6587\u4ef6\u5185\u5bb9"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/9a6a1d75-0f80-4b67-9305-099eedf27e60.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u6587\u4ef6\u8def\u5f84\u5982\u4f55\u8fd4\u56de\u6587\u4ef6\u5185\u5bb9\" \/><\/p>\n<p><p> <strong>Python\u6587\u4ef6\u8def\u5f84\u5982\u4f55\u8fd4\u56de\u6587\u4ef6\u5185\u5bb9<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c<strong>\u901a\u8fc7\u6587\u4ef6\u8def\u5f84\u8fd4\u56de\u6587\u4ef6\u5185\u5bb9\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u3001<code>pathlib<\/code>\u5e93\u3001\u4ee5\u53ca<code>os<\/code>\u5e93<\/strong>\u3002\u5176\u4e2d\uff0c<strong>\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u662f\u6700\u5e38\u89c1\u4e14\u7b80\u5355\u7684\u65b9\u6cd5<\/strong>\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u4f7f\u7528<code>open()<\/code>\u51fd\u6570\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/strong><\/p>\n<\/p>\n<p><p>\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u662fPython\u4e2d\u6700\u5e38\u7528\u7684\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u7684\u65b9\u6cd5\u3002\u8be5\u51fd\u6570\u53ef\u4ee5\u6253\u5f00\u6587\u4ef6\u5e76\u8fd4\u56de\u6587\u4ef6\u5bf9\u8c61\uff0c\u7136\u540e\u53ef\u4ee5\u4f7f\u7528\u6587\u4ef6\u5bf9\u8c61\u7684<code>read()<\/code>\u65b9\u6cd5\u8bfb\u53d6\u6587\u4ef6\u7684\u5185\u5bb9\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def read_file_content(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        content = file.read()<\/p>\n<p>    return content<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<p>content = read_file_content(file_path)<\/p>\n<p>print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>open(file_path, &#39;r&#39;)<\/code>\u4ee5\u8bfb\u53d6\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u8fd4\u56de\u6587\u4ef6\u5bf9\u8c61\u3002<code>with<\/code>\u8bed\u53e5\u786e\u4fdd\u6587\u4ef6\u5728\u8bfb\u53d6\u5b8c\u6210\u540e\u81ea\u52a8\u5173\u95ed\uff0c<code>file.read()<\/code>\u65b9\u6cd5\u8bfb\u53d6\u6587\u4ef6\u7684\u5168\u90e8\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528<code>pathlib<\/code>\u5e93\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/h3>\n<\/p>\n<p><p><code>pathlib<\/code>\u5e93\u662fPython 3.4\u5f15\u5165\u7684\u9762\u5411\u5bf9\u8c61\u7684\u6587\u4ef6\u7cfb\u7edf\u8def\u5f84\u5e93\u3002\u5b83\u63d0\u4f9b\u4e86\u66f4\u76f4\u89c2\u548c\u65b9\u4fbf\u7684\u6587\u4ef6\u8def\u5f84\u64cd\u4f5c\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pathlib import Path<\/p>\n<p>def read_file_content(file_path):<\/p>\n<p>    path = Path(file_path)<\/p>\n<p>    content = path.read_text()<\/p>\n<p>    return content<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<p>content = read_file_content(file_path)<\/p>\n<p>print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>Path(file_path)<\/code>\u521b\u5efa\u4e00\u4e2a<code>Path<\/code>\u5bf9\u8c61\uff0c\u7136\u540e\u901a\u8fc7\u8c03\u7528<code>read_text()<\/code>\u65b9\u6cd5\u8bfb\u53d6\u6587\u4ef6\u7684\u5185\u5bb9\u3002<code>pathlib<\/code>\u5e93\u4f7f\u6587\u4ef6\u8def\u5f84\u64cd\u4f5c\u66f4\u52a0\u7b80\u6d01\u548c\u6613\u8bfb\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528<code>os<\/code>\u5e93\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/h3>\n<\/p>\n<p><p><code>os<\/code>\u5e93\u662fPython\u7684\u6807\u51c6\u5e93\uff0c\u63d0\u4f9b\u4e86\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u4ea4\u4e92\u7684\u529f\u80fd\u3002\u901a\u8fc7<code>os<\/code>\u5e93\u53ef\u4ee5\u66f4\u7075\u6d3b\u5730\u64cd\u4f5c\u6587\u4ef6\u548c\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def read_file_content(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        content = file.read()<\/p>\n<p>    return content<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>file_path = os.path.join(&#39;directory&#39;, &#39;example.txt&#39;)<\/p>\n<p>content = read_file_content(file_path)<\/p>\n<p>print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>os.path.join()<\/code>\u51fd\u6570\u7528\u4e8e\u6784\u5efa\u6587\u4ef6\u8def\u5f84\uff0c\u4f7f\u4ee3\u7801\u66f4\u52a0\u8de8\u5e73\u53f0\u3002\u7136\u540e\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5904\u7406\u5927\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5927\u6587\u4ef6\uff0c\u76f4\u63a5\u4f7f\u7528<code>read()<\/code>\u65b9\u6cd5\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u5b58\u95ee\u9898\u3002\u6b64\u65f6\u53ef\u4ee5\u4f7f\u7528<code>readline()<\/code>\u65b9\u6cd5\u9010\u884c\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c\u6216\u8005\u4f7f\u7528<code>readlines()<\/code>\u65b9\u6cd5\u5c06\u6587\u4ef6\u5185\u5bb9\u8bfb\u53d6\u5230\u4e00\u4e2a\u5217\u8868\u4e2d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def read_large_file(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        for line in file:<\/p>\n<p>            print(line, end=&#39;&#39;)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>file_path = &#39;large_example.txt&#39;<\/p>\n<p>read_large_file(file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>for line in file<\/code>\u9010\u884c\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c\u9002\u7528\u4e8e\u5904\u7406\u5927\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u9519\u8bef\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u8bfb\u53d6\u6587\u4ef6\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u6587\u4ef6\u4e0d\u5b58\u5728\u3001\u6743\u9650\u4e0d\u8db3\u7b49\u9519\u8bef\u3002\u4e3a\u4e86\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u8bed\u53e5\u8fdb\u884c\u9519\u8bef\u5904\u7406\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def read_file_content(file_path):<\/p>\n<p>    try:<\/p>\n<p>        with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>            content = file.read()<\/p>\n<p>        return content<\/p>\n<p>    except FileNotFoundError:<\/p>\n<p>        return &quot;Error: File not found.&quot;<\/p>\n<p>    except PermissionError:<\/p>\n<p>        return &quot;Error: Permission denied.&quot;<\/p>\n<p>    except Exception as e:<\/p>\n<p>        return f&quot;Error: {e}&quot;<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>file_path = &#39;nonexistent.txt&#39;<\/p>\n<p>content = read_file_content(file_path)<\/p>\n<p>print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>try-except<\/code>\u8bed\u53e5\u6355\u83b7\u5e76\u5904\u7406\u53ef\u80fd\u7684\u9519\u8bef\uff0c\u786e\u4fdd\u7a0b\u5e8f\u4e0d\u4f1a\u56e0\u4e3a\u672a\u5904\u7406\u7684\u5f02\u5e38\u800c\u5d29\u6e83\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u8bfb\u53d6\u4e0d\u540c\u683c\u5f0f\u7684\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u6839\u636e\u6587\u4ef6\u7684\u683c\u5f0f\u4e0d\u540c\uff0c\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u7684\u65b9\u6cd5\u4e5f\u6709\u6240\u4e0d\u540c\u3002\u4e0b\u9762\u4ecb\u7ecd\u51e0\u79cd\u5e38\u89c1\u6587\u4ef6\u683c\u5f0f\u7684\u8bfb\u53d6\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u8bfb\u53d6CSV\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8eCSV\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>csv<\/code>\u6a21\u5757\u8bfb\u53d6\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import csv<\/p>\n<p>def read_csv_file(file_path):<\/p>\n<p>    with open(file_path, newline=&#39;&#39;) as csvfile:<\/p>\n<p>        reader = csv.reader(csvfile)<\/p>\n<p>        for row in reader:<\/p>\n<p>            print(row)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>file_path = &#39;example.csv&#39;<\/p>\n<p>read_csv_file(file_path)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>csv.reader<\/code>\u7528\u4e8e\u8bfb\u53d6CSV\u6587\u4ef6\uff0c\u5e76\u9010\u884c\u6253\u5370\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u8bfb\u53d6JSON\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8eJSON\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>json<\/code>\u6a21\u5757\u8bfb\u53d6\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<p>def read_json_file(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        data = json.load(file)<\/p>\n<p>    return data<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>file_path = &#39;example.json&#39;<\/p>\n<p>data = read_json_file(file_path)<\/p>\n<p>print(data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>json.load<\/code>\u7528\u4e8e\u5c06JSON\u6587\u4ef6\u5185\u5bb9\u52a0\u8f7d\u4e3aPython\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u8bfb\u53d6Excel\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8eExcel\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pandas<\/code>\u5e93\u8bfb\u53d6\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>def read_excel_file(file_path):<\/p>\n<p>    df = pd.read_excel(file_path)<\/p>\n<p>    return df<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>file_path = &#39;example.xlsx&#39;<\/p>\n<p>df = read_excel_file(file_path)<\/p>\n<p>print(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>pandas.read_excel<\/code>\u7528\u4e8e\u5c06Excel\u6587\u4ef6\u5185\u5bb9\u52a0\u8f7d\u4e3aDataFrame\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c<strong>\u53ef\u4ee5\u5728Python\u4e2d\u8f7b\u677e\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/strong>\u3002<strong>\u65e0\u8bba\u662f\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u3001<code>pathlib<\/code>\u5e93\uff0c\u8fd8\u662f<code>os<\/code>\u5e93\uff0c\u90fd\u80fd\u6ee1\u8db3\u5927\u591a\u6570\u573a\u666f\u7684\u9700\u6c42<\/strong>\u3002\u6b64\u5916\uff0c<strong>\u5904\u7406\u5927\u6587\u4ef6\u548c\u9519\u8bef\u5904\u7406\u4e5f\u662f\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u65f6\u9700\u8981\u6ce8\u610f\u7684\u91cd\u70b9<\/strong>\u3002\u638c\u63e1\u8fd9\u4e9b\u65b9\u6cd5\u548c\u6280\u5de7\uff0c\u53ef\u4ee5\u8ba9\u4f60\u5728\u7f16\u5199Python\u7a0b\u5e8f\u65f6\u66f4\u52a0\u5f97\u5fc3\u5e94\u624b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u6765\u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u901a\u8fc7<code>read()<\/code>\u3001<code>readline()<\/code>\u6216<code>readlines()<\/code>\u65b9\u6cd5\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>with open(&#39;file_path.txt&#39;, &#39;r&#39;) as file:<\/code>\u53ef\u4ee5\u5b89\u5168\u5730\u6253\u5f00\u6587\u4ef6\u5e76\u5728\u4ee3\u7801\u5757\u7ed3\u675f\u540e\u81ea\u52a8\u5173\u95ed\u6587\u4ef6\u3002\u901a\u8fc7\u8c03\u7528<code>file.read()<\/code>\u53ef\u4ee5\u4e00\u6b21\u6027\u8bfb\u53d6\u6574\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u800c<code>file.readlines()<\/code>\u5219\u4f1a\u5c06\u6587\u4ef6\u7684\u6bcf\u4e00\u884c\u4f5c\u4e3a\u5217\u8868\u5143\u7d20\u8fd4\u56de\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u5904\u7406\u6587\u4ef6\u8def\u5f84\uff1f<\/strong><br \/>\u5728\u5904\u7406\u6587\u4ef6\u8def\u5f84\u65f6\uff0c\u63a8\u8350\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u4e2d\u7684<code>os.path<\/code>\u65b9\u6cd5\uff0c\u6216\u4f7f\u7528<code>pathlib<\/code>\u6a21\u5757\u6765\u66f4\u65b9\u4fbf\u5730\u6784\u5efa\u548c\u64cd\u4f5c\u6587\u4ef6\u8def\u5f84\u3002\u901a\u8fc7<code>os.path.join()<\/code>\u53ef\u4ee5\u786e\u4fdd\u8de8\u5e73\u53f0\u7684\u8def\u5f84\u683c\u5f0f\uff0c\u800c<code>pathlib.Path<\/code>\u63d0\u4f9b\u4e86\u66f4\u76f4\u89c2\u7684\u9762\u5411\u5bf9\u8c61\u65b9\u6cd5\u6765\u5904\u7406\u6587\u4ef6\u8def\u5f84\u3002<\/p>\n<p><strong>\u5982\u679c\u6587\u4ef6\u4e0d\u5b58\u5728\uff0c\u5982\u4f55\u5904\u7406\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u8bfb\u53d6\u6587\u4ef6\u65f6\uff0c\u5982\u679c\u6587\u4ef6\u4e0d\u5b58\u5728\uff0c\u4f1a\u629b\u51fa<code>FileNotFoundError<\/code>\u5f02\u5e38\u3002\u4e3a\u4e86\u5904\u7406\u8fd9\u79cd\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u5f02\u5e38\uff0c\u5e76\u63d0\u4f9b\u76f8\u5e94\u7684\u9519\u8bef\u63d0\u793a\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>try:<\/code>\u5757\u6765\u5c1d\u8bd5\u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u5728<code>except FileNotFoundError:<\/code>\u5757\u4e2d\u5904\u7406\u6587\u4ef6\u672a\u627e\u5230\u7684\u60c5\u51b5\uff0c\u4ee5\u4fbf\u8ba9\u7528\u6237\u77e5\u9053\u8be5\u6587\u4ef6\u65e0\u6cd5\u8bbf\u95ee\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u6587\u4ef6\u8def\u5f84\u5982\u4f55\u8fd4\u56de\u6587\u4ef6\u5185\u5bb9 \u5728Python\u4e2d\uff0c\u901a\u8fc7\u6587\u4ef6\u8def\u5f84\u8fd4\u56de\u6587\u4ef6\u5185\u5bb9\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u4e3b\u8981\u5305\u62ec\u4f7f\u7528\u5185\u7f6e [&hellip;]","protected":false},"author":3,"featured_media":1038024,"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\/1038011"}],"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=1038011"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1038011\/revisions"}],"predecessor-version":[{"id":1038031,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1038011\/revisions\/1038031"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1038024"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1038011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1038011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1038011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}