{"id":1042882,"date":"2024-12-31T13:01:09","date_gmt":"2024-12-31T05:01:09","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1042882.html"},"modified":"2024-12-31T13:01:12","modified_gmt":"2024-12-31T05:01:12","slug":"python%e5%a6%82%e4%bd%95%e6%8a%8a%e5%88%97%e8%a1%a8%e5%82%a8%e5%ad%98%e5%88%b0txt%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1042882.html","title":{"rendered":"python\u5982\u4f55\u628a\u5217\u8868\u50a8\u5b58\u5230txt\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/07d28596-bef5-45a0-a5c2-4b5bcc20b1ed.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u628a\u5217\u8868\u50a8\u5b58\u5230txt\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u5c06\u5217\u8868\u5b58\u50a8\u5230txt\u6587\u4ef6\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528<code>write<\/code>\u3001<code>writelines<\/code>\u4ee5\u53ca<code>json<\/code>\u6a21\u5757\u7b49\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u4e00\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528<code>write<\/code>\u65b9\u6cd5\u5c06\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u5199\u5165\u6587\u4ef6\uff0c\u6bcf\u4e2a\u5143\u7d20\u5360\u4e00\u884c\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u5c06Python\u4e2d\u7684\u5217\u8868\u5b58\u50a8\u5230txt\u6587\u4ef6\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u901a\u8fc7\u6587\u4ef6\u64cd\u4f5c\u6765\u5b9e\u73b0\u3002\u9996\u5148\uff0c\u6253\u5f00\u6587\u4ef6\u5e76\u8bbe\u7f6e\u5199\u5165\u6a21\u5f0f\uff1b\u7136\u540e\uff0c\u904d\u5386\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\uff0c\u5c06\u5176\u5199\u5165\u6587\u4ef6\uff1b\u6700\u540e\uff0c\u5173\u95ed\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528write\u65b9\u6cd5\u5c06\u5217\u8868\u5199\u5165\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528<code>write<\/code>\u65b9\u6cd5\u65f6\uff0c\u6211\u4eec\u9700\u8981\u5c06\u6bcf\u4e2a\u5143\u7d20\u8f6c\u5316\u4e3a\u5b57\u7b26\u4e32\u5e76\u6dfb\u52a0\u6362\u884c\u7b26\uff08<code>\\n<\/code>\uff09\u4ee5\u786e\u4fdd\u6bcf\u4e2a\u5143\u7d20\u5360\u4e00\u884c\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5217\u8868<\/p>\n<p>my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;, &#39;date&#39;, &#39;elderberry&#39;]<\/p>\n<h2><strong>\u6253\u5f00\u6587\u4ef6\u5e76\u8bbe\u7f6e\u5199\u5165\u6a21\u5f0f<\/strong><\/h2>\n<p>with open(&#39;output.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    for item in my_list:<\/p>\n<p>        file.write(f&quot;{item}\\n&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>with open(&#39;output.txt&#39;, &#39;w&#39;) as file:<\/code>\u7528\u4e8e\u6253\u5f00\u6587\u4ef6<code>output.txt<\/code>\u5e76\u8bbe\u7f6e\u5199\u5165\u6a21\u5f0f\u3002<code>file.write(f&quot;{item}\\n&quot;)<\/code>\u5c06\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u5199\u5165\u6587\u4ef6\u5e76\u6dfb\u52a0\u6362\u884c\u7b26\u3002<code>with<\/code>\u8bed\u53e5\u4f1a\u81ea\u52a8\u5173\u95ed\u6587\u4ef6\uff0c\u65e0\u9700\u663e\u5f0f\u8c03\u7528<code>file.close()<\/code>\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528writelines\u65b9\u6cd5\u5c06\u5217\u8868\u5199\u5165\u6587\u4ef6<\/h3>\n<\/p>\n<p><p><code>writelines<\/code>\u65b9\u6cd5\u53ef\u4ee5\u4e00\u6b21\u6027\u5c06\u4e00\u4e2a\u5305\u542b\u5b57\u7b26\u4e32\u7684\u5217\u8868\u5199\u5165\u6587\u4ef6\u3002\u6211\u4eec\u9700\u8981\u786e\u4fdd\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u5df2\u7ecf\u5305\u542b\u6362\u884c\u7b26\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5b9a\u4e49\u4e00\u4e2a\u5217\u8868<\/p>\n<p>my_list = [&#39;apple\\n&#39;, &#39;banana\\n&#39;, &#39;cherry\\n&#39;, &#39;date\\n&#39;, &#39;elderberry\\n&#39;]<\/p>\n<h2><strong>\u6253\u5f00\u6587\u4ef6\u5e76\u8bbe\u7f6e\u5199\u5165\u6a21\u5f0f<\/strong><\/h2>\n<p>with open(&#39;output.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.writelines(my_list)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>file.writelines(my_list)<\/code>\u4f1a\u5c06\u5217\u8868\u4e2d\u7684\u6240\u6709\u5143\u7d20\u4e00\u6b21\u6027\u5199\u5165\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528json\u6a21\u5757\u5c06\u5217\u8868\u5199\u5165\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u5217\u8868\u4e2d\u7684\u5143\u7d20\u662f\u590d\u6742\u6570\u636e\u7c7b\u578b\uff08\u5982\u5b57\u5178\uff09\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>json<\/code>\u6a21\u5757\u5c06\u5176\u5e8f\u5217\u5316\u4e3aJSON\u683c\u5f0f\u5e76\u5199\u5165\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<h2><strong>\u5b9a\u4e49\u4e00\u4e2a\u5217\u8868<\/strong><\/h2>\n<p>my_list = [{&#39;name&#39;: &#39;apple&#39;, &#39;color&#39;: &#39;red&#39;}, {&#39;name&#39;: &#39;banana&#39;, &#39;color&#39;: &#39;yellow&#39;}, {&#39;name&#39;: &#39;cherry&#39;, &#39;color&#39;: &#39;red&#39;}]<\/p>\n<h2><strong>\u6253\u5f00\u6587\u4ef6\u5e76\u8bbe\u7f6e\u5199\u5165\u6a21\u5f0f<\/strong><\/h2>\n<p>with open(&#39;output.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    json.dump(my_list, file)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>json.dump(my_list, file)<\/code>\u5c06\u5217\u8868\u5e8f\u5217\u5316\u4e3aJSON\u683c\u5f0f\u5e76\u5199\u5165\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5904\u7406\u6587\u4ef6\u5199\u5165\u8fc7\u7a0b\u4e2d\u7684\u5f02\u5e38<\/h3>\n<\/p>\n<p><p>\u5728\u6587\u4ef6\u5199\u5165\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u53d1\u751f\u4e00\u4e9b\u5f02\u5e38\uff08\u5982\u6587\u4ef6\u6743\u9650\u4e0d\u8db3\u3001\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\u7b49\uff09\u3002\u4e3a\u4e86\u4fdd\u8bc1\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u8bed\u53e5\u6355\u83b7\u5e76\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;, &#39;date&#39;, &#39;elderberry&#39;]<\/p>\n<p>try:<\/p>\n<p>    with open(&#39;output.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>        for item in my_list:<\/p>\n<p>            file.write(f&quot;{item}\\n&quot;)<\/p>\n<p>except IOError as e:<\/p>\n<p>    print(f&quot;An error occurred while writing to the file: {e}&quot;)<\/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\u53d1\u751f\u7684<code>IOError<\/code>\u5f02\u5e38\uff0c\u5e76\u8f93\u51fa\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5c06\u5217\u8868\u5143\u7d20\u5199\u5165\u6587\u4ef6\u7684\u4e0d\u540c\u683c\u5f0f<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u6211\u4eec\u53ef\u80fd\u9700\u8981\u5c06\u5217\u8868\u4e2d\u7684\u5143\u7d20\u4ee5\u7279\u5b9a\u7684\u683c\u5f0f\u5199\u5165\u6587\u4ef6\uff0c\u5982\u9017\u53f7\u5206\u9694\u6216\u5236\u8868\u7b26\u5206\u9694\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;, &#39;date&#39;, &#39;elderberry&#39;]<\/p>\n<h2><strong>\u9017\u53f7\u5206\u9694<\/strong><\/h2>\n<p>with open(&#39;output_comma.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&#39;,&#39;.join(my_list))<\/p>\n<h2><strong>\u5236\u8868\u7b26\u5206\u9694<\/strong><\/h2>\n<p>with open(&#39;output_tab.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    file.write(&#39;\\t&#39;.join(my_list))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>&#39;,&#39;.join(my_list)<\/code>\u548c<code>\\t.join(my_list)<\/code>\u5c06\u5217\u8868\u4e2d\u7684\u5143\u7d20\u8fde\u63a5\u6210\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u5e76\u5206\u522b\u4f7f\u7528\u9017\u53f7\u548c\u5236\u8868\u7b26\u8fdb\u884c\u5206\u9694\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5c06\u591a\u7ef4\u5217\u8868\u5199\u5165\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u591a\u7ef4\u5217\u8868\uff08\u5373\u5305\u542b\u5b50\u5217\u8868\u7684\u5217\u8868\uff09\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5d4c\u5957\u7684<code>for<\/code>\u5faa\u73af\u5c06\u6bcf\u4e2a\u5b50\u5217\u8868\u7684\u5143\u7d20\u5199\u5165\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [[&#39;apple&#39;, &#39;red&#39;], [&#39;banana&#39;, &#39;yellow&#39;], [&#39;cherry&#39;, &#39;red&#39;]]<\/p>\n<p>with open(&#39;output_multidimensional.txt&#39;, &#39;w&#39;) as file:<\/p>\n<p>    for sub_list in my_list:<\/p>\n<p>        file.write(&#39;\\t&#39;.join(sub_list) + &#39;\\n&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>&#39;\\t&#39;.join(sub_list)<\/code>\u5c06\u6bcf\u4e2a\u5b50\u5217\u8868\u7684\u5143\u7d20\u8fde\u63a5\u6210\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u5e76\u4f7f\u7528\u5236\u8868\u7b26\u5206\u9694\uff0c<code>file.write(&#39;\\t&#39;.join(sub_list) + &#39;\\n&#39;)<\/code>\u5c06\u5176\u5199\u5165\u6587\u4ef6\u5e76\u6dfb\u52a0\u6362\u884c\u7b26\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u5e76\u9a8c\u8bc1\u5199\u5165\u7ed3\u679c<\/h3>\n<\/p>\n<p><p>\u5199\u5165\u6587\u4ef6\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u4ee5\u9a8c\u8bc1\u5199\u5165\u7ed3\u679c\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;output.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p>    print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>file.read()<\/code>\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u6240\u6709\u5185\u5bb9\uff0c\u5e76\u8f93\u51fa\u5230\u63a7\u5236\u53f0\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u7075\u6d3b\u5730\u5c06Python\u5217\u8868\u5b58\u50a8\u5230txt\u6587\u4ef6\u4e2d\u3002\u65e0\u8bba\u662f\u7b80\u5355\u7684\u5b57\u7b26\u4e32\u5217\u8868\uff0c\u8fd8\u662f\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784\uff08\u5982\u5b57\u5178\u5217\u8868\uff09\uff0c\u6211\u4eec\u90fd\u53ef\u4ee5\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u8fdb\u884c\u5199\u5165\u3002\u540c\u65f6\uff0c\u5904\u7406\u6587\u4ef6\u5199\u5165\u8fc7\u7a0b\u4e2d\u7684\u5f02\u5e38\u548c\u9a8c\u8bc1\u5199\u5165\u7ed3\u679c\u4e5f\u662f\u4fdd\u8bc1\u7a0b\u5e8f\u5065\u58ee\u6027\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u5e0c\u671b\u8fd9\u4e9b\u65b9\u6cd5\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\uff0c\u80fd\u591f\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u5904\u7406\u5217\u8868\u5199\u5165\u6587\u4ef6\u7684\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5c06Python\u5217\u8868\u4e2d\u7684\u6570\u636e\u4ee5\u53ef\u8bfb\u5f62\u5f0f\u4fdd\u5b58\u5230txt\u6587\u4ef6\u4e2d\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5185\u7f6e\u51fd\u6570\uff0c\u5c06\u5217\u8868\u5185\u5bb9\u9010\u884c\u5199\u5165txt\u6587\u4ef6\u3002\u9996\u5148\u6253\u5f00\u6587\u4ef6\u5e76\u9009\u62e9\u5199\u5165\u6a21\u5f0f\uff0c\u7136\u540e\u5229\u7528\u5faa\u73af\u904d\u5386\u5217\u8868\u4e2d\u7684\u5143\u7d20\uff0c\u5c06\u6bcf\u4e2a\u5143\u7d20\u5199\u5165\u6587\u4ef6\u4e2d\u3002\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;]\nwith open(&#39;output.txt&#39;, &#39;w&#39;) as f:\n    for item in my_list:\n        f.write(f&quot;{item}\\n&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u6bcf\u4e2a\u5217\u8868\u5143\u7d20\u5c06\u88ab\u5199\u5165\u6587\u4ef6\u7684\u5355\u72ec\u4e00\u884c\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u4ee5\u7279\u5b9a\u683c\u5f0f\u5c06\u5217\u8868\u4fdd\u5b58\u5230txt\u6587\u4ef6\uff1f<\/strong><br \/>\u82e5\u9700\u8981\u5c06\u5217\u8868\u4ee5\u7279\u5b9a\u683c\u5f0f\u4fdd\u5b58\uff0c\u4f8b\u5982\u4ee5\u9017\u53f7\u5206\u9694\uff0c\u53ef\u4ee5\u4f7f\u7528<code>join()<\/code>\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u793a\u4f8b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;]\nwith open(&#39;output.txt&#39;, &#39;w&#39;) as f:\n    f.write(&#39;, &#39;.join(my_list))\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u5c06\u5217\u8868\u5185\u5bb9\u4fdd\u5b58\u4e3a\u4e00\u884c\uff0c\u5143\u7d20\u4e4b\u95f4\u7528\u9017\u53f7\u548c\u7a7a\u683c\u5206\u9694\u3002<\/p>\n<p><strong>\u5982\u679c\u5217\u8868\u4e2d\u5305\u542b\u591a\u4e2a\u6570\u636e\u7c7b\u578b\uff0c\u5982\u4f55\u5904\u7406\u4fdd\u5b58\u5230txt\u6587\u4ef6\u7684\u95ee\u9898\uff1f<\/strong><br \/>\u5f53\u5217\u8868\u4e2d\u5305\u542b\u4e0d\u540c\u6570\u636e\u7c7b\u578b\uff08\u5982\u5b57\u7b26\u4e32\u3001\u6574\u6570\u7b49\uff09\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>str()<\/code>\u51fd\u6570\u5c06\u6bcf\u4e2a\u5143\u7d20\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">my_list = [&#39;apple&#39;, 42, &#39;banana&#39;, 3.14]\nwith open(&#39;output.txt&#39;, &#39;w&#39;) as f:\n    for item in my_list:\n        f.write(f&quot;{str(item)}\\n&quot;)\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u65e0\u8bba\u5143\u7d20\u7c7b\u578b\u5982\u4f55\uff0c\u90fd\u4f1a\u88ab\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\u5e76\u9010\u884c\u5199\u5165\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u5c06\u5217\u8868\u5b58\u50a8\u5230txt\u6587\u4ef6\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528write\u3001writelines\u4ee5\u53cajson\u6a21\u5757\u7b49\u3002\u4e0b\u9762\u5c06 [&hellip;]","protected":false},"author":3,"featured_media":1042897,"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\/1042882"}],"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=1042882"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1042882\/revisions"}],"predecessor-version":[{"id":1042899,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1042882\/revisions\/1042899"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1042897"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1042882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1042882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1042882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}