{"id":1119289,"date":"2025-01-08T18:43:19","date_gmt":"2025-01-08T10:43:19","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1119289.html"},"modified":"2025-01-08T18:43:22","modified_gmt":"2025-01-08T10:43:22","slug":"python%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%ad%e6%96%87%e4%bb%b6%e4%b8%ad%e6%9c%89%e6%b2%a1%e6%9c%89%e6%95%b0%e6%8d%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1119289.html","title":{"rendered":"python\u5982\u4f55\u5224\u65ad\u6587\u4ef6\u4e2d\u6709\u6ca1\u6709\u6570\u636e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25082443\/b089328f-97f7-4ada-87fc-a7f93f934cb3.webp\" alt=\"python\u5982\u4f55\u5224\u65ad\u6587\u4ef6\u4e2d\u6709\u6ca1\u6709\u6570\u636e\" \/><\/p>\n<p><p> <strong>Python\u5224\u65ad\u6587\u4ef6\u4e2d\u6709\u6ca1\u6709\u6570\u636e<\/strong>\uff0c\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u51e0\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\uff0c\u5982\uff1a\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3001\u5c1d\u8bd5\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u7b2c\u4e00\u884c\u7b49\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u76f8\u5e94\u7684\u4ee3\u7801\u793a\u4f8b\u3002\u5176\u4e2d\uff0c<strong>\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f<\/strong>\u662f\u6700\u5e38\u7528\u4e14\u9ad8\u6548\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f<\/h3>\n<\/p>\n<p><p>\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f\u662f\u5224\u65ad\u6587\u4ef6\u4e2d\u6709\u6ca1\u6709\u6570\u636e\u7684\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\u3002\u5982\u679c\u6587\u4ef6\u5927\u5c0f\u4e3a0\uff0c\u5219\u6587\u4ef6\u4e3a\u7a7a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def is_file_empty(file_path):<\/p>\n<p>    return os.path.getsize(file_path) == 0<\/p>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<p>if is_file_empty(file_path):<\/p>\n<p>    print(f&quot;{file_path} is empty.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;{file_path} has data.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c\u53ef\u4ee5\u66f4\u52a0\u7cbe\u786e\u5730\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u3002\u5373\u4f7f\u6587\u4ef6\u5927\u5c0f\u4e0d\u4e3a\u96f6\uff0c\u4e5f\u53ef\u80fd\u6ca1\u6709\u6709\u6548\u7684\u6570\u636e\uff0c\u4f8b\u5982\u53ea\u6709\u7a7a\u767d\u5b57\u7b26\u6216\u6362\u884c\u7b26\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_file_empty(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        content = file.read().strip()<\/p>\n<p>        return len(content) == 0<\/p>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<p>if is_file_empty(file_path):<\/p>\n<p>    print(f&quot;{file_path} is empty.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;{file_path} has data.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5c1d\u8bd5\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u7b2c\u4e00\u884c<\/h3>\n<\/p>\n<p><p>\u5c1d\u8bd5\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u7b2c\u4e00\u884c\uff0c\u5982\u679c\u80fd\u6210\u529f\u8bfb\u53d6\u4e14\u8be5\u884c\u5185\u5bb9\u4e0d\u4e3a\u7a7a\uff0c\u90a3\u4e48\u6587\u4ef6\u4e2d\u5c31\u6709\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_file_empty(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        first_line = file.readline().strip()<\/p>\n<p>        return len(first_line) == 0<\/p>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<p>if is_file_empty(file_path):<\/p>\n<p>    print(f&quot;{file_path} is empty.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;{file_path} has data.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u8fdb\u884c\u5224\u65ad<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u6211\u4eec\u9700\u8981\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u6765\u66f4\u52a0\u51c6\u786e\u5730\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def is_file_empty(file_path):<\/p>\n<p>    if os.path.getsize(file_path) == 0:<\/p>\n<p>        return True<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        content = file.read().strip()<\/p>\n<p>        return len(content) == 0<\/p>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<p>if is_file_empty(file_path):<\/p>\n<p>    print(f&quot;{file_path} is empty.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;{file_path} has data.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u5982\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u6587\u672c\u6587\u4ef6\uff0c\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u7684\u65b9\u6cd5\u53ef\u80fd\u6709\u6240\u4e0d\u540c\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u6587\u672c\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u6587\u672c\u6587\u4ef6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u524d\u9762\u4ecb\u7ecd\u7684\u51e0\u79cd\u65b9\u6cd5\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">file_path = &#39;example.txt&#39;<\/p>\n<p>if is_file_empty(file_path):<\/p>\n<p>    print(f&quot;{file_path} is empty.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;{file_path} has data.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5bf9\u4e8e\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528\u4e8c\u8fdb\u5236\u6a21\u5f0f\u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u8fdb\u884c\u5224\u65ad\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def is_binary_file_empty(file_path):<\/p>\n<p>    with open(file_path, &#39;rb&#39;) as file:<\/p>\n<p>        content = file.read().strip()<\/p>\n<p>        return len(content) == 0<\/p>\n<p>file_path = &#39;example.bin&#39;<\/p>\n<p>if is_binary_file_empty(file_path):<\/p>\n<p>    print(f&quot;{file_path} is empty.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;{file_path} has data.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u6709\u6548\u5730\u5224\u65ad\u6587\u4ef6\u4e2d\u662f\u5426\u6709\u6570\u636e\u3002<strong>\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f<\/strong>\u662f\u6700\u7b80\u5355\u4e14\u9ad8\u6548\u7684\u65b9\u6cd5\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u7ed3\u5408<strong>\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9<\/strong>\u548c<strong>\u5c1d\u8bd5\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u7b2c\u4e00\u884c<\/strong>\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u66f4\u52a0\u7cbe\u786e\u5730\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u3002\u5bf9\u4e8e\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6\uff0c\u5982\u6587\u672c\u6587\u4ef6\u548c\u4e8c\u8fdb\u5236\u6587\u4ef6\uff0c\u4e5f\u9700\u8981\u91c7\u7528\u4e0d\u540c\u7684\u65b9\u6cd5\u8fdb\u884c\u5904\u7406\u3002\u5e0c\u671b\u672c\u6587\u5bf9\u60a8\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u6700\u4f73\u5b9e\u8df5<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\uff0c\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u53ef\u80fd\u53ea\u662f\u4e00\u4e2a\u5c0f\u6b65\u9aa4\uff0c\u4f46\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u6548\u7387\u548c\u51c6\u786e\u6027\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u4f18\u5148\u4f7f\u7528\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f\u7684\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f\u662f\u6700\u5feb\u901f\u4e14\u8d44\u6e90\u6d88\u8017\u6700\u5c0f\u7684\u65b9\u6cd5\u3002\u5982\u679c\u6587\u4ef6\u5927\u5c0f\u4e3a\u96f6\uff0c\u76f4\u63a5\u5224\u65ad\u6587\u4ef6\u4e3a\u7a7a\uff0c\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u6587\u4ef6\u8bfb\u53d6\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u8003\u8651\u6587\u4ef6\u5185\u5bb9\u7684\u5b9e\u9645\u60c5\u51b5<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\u6587\u4ef6\u53ef\u80fd\u5305\u542b\u7a7a\u767d\u5b57\u7b26\u6216\u6362\u884c\u7b26\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\u4ec5\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f\u53ef\u80fd\u4e0d\u591f\u51c6\u786e\u3002\u53ef\u4ee5\u7ed3\u5408\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u7684\u65b9\u6cd5\uff0c\u8fdb\u4e00\u6b65\u5224\u65ad\u6587\u4ef6\u662f\u5426\u5305\u542b\u6709\u6548\u6570\u636e\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u6839\u636e\u6587\u4ef6\u7c7b\u578b\u9009\u62e9\u5408\u9002\u7684\u5224\u65ad\u65b9\u6cd5\u3002\u4f8b\u5982\uff0c\u6587\u672c\u6587\u4ef6\u548c\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5904\u7406\u65b9\u5f0f\u6709\u6240\u4e0d\u540c\uff0c\u786e\u4fdd\u4f7f\u7528\u6b63\u786e\u7684\u6587\u4ef6\u8bfb\u53d6\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<p><h4>4\u3001\u5904\u7406\u5f02\u5e38\u60c5\u51b5<\/h4>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6587\u4ef6\u53ef\u80fd\u4e0d\u5b58\u5728\u6216\u65e0\u6cd5\u8bfb\u53d6\u3002\u9700\u8981\u6dfb\u52a0\u5f02\u5e38\u5904\u7406\u4ee3\u7801\uff0c\u4ee5\u786e\u4fdd\u7a0b\u5e8f\u7684\u7a33\u5b9a\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import os<\/p>\n<p>def is_file_empty(file_path):<\/p>\n<p>    try:<\/p>\n<p>        if os.path.getsize(file_path) == 0:<\/p>\n<p>            return True<\/p>\n<p>        with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>            content = file.read().strip()<\/p>\n<p>            return len(content) == 0<\/p>\n<p>    except FileNotFoundError:<\/p>\n<p>        print(f&quot;File {file_path} does not exist.&quot;)<\/p>\n<p>        return False<\/p>\n<p>    except IOError:<\/p>\n<p>        print(f&quot;Could not read file {file_path}.&quot;)<\/p>\n<p>        return False<\/p>\n<p>file_path = &#39;example.txt&#39;<\/p>\n<p>if is_file_empty(file_path):<\/p>\n<p>    print(f&quot;{file_path} is empty.&quot;)<\/p>\n<p>else:<\/p>\n<p>    print(f&quot;{file_path} has data.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u52a0\u51c6\u786e\u548c\u9ad8\u6548\u5730\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u591f\u5e2e\u52a9\u60a8\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u66f4\u597d\u5730\u5904\u7406\u6587\u4ef6\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u68c0\u67e5\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>os<\/code>\u6a21\u5757\u6216\u8005\u76f4\u63a5\u8bfb\u53d6\u6587\u4ef6\u6765\u5224\u65ad\u6587\u4ef6\u662f\u5426\u4e3a\u7a7a\u3002\u901a\u8fc7<code>os.path.getsize()<\/code>\u51fd\u6570\u53ef\u4ee5\u83b7\u53d6\u6587\u4ef6\u7684\u5b57\u8282\u6570\uff0c\u5982\u679c\u8fd4\u56de\u503c\u4e3a0\uff0c\u8868\u793a\u6587\u4ef6\u4e3a\u7a7a\u3002\u53e6\u5916\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u6253\u5f00\u6587\u4ef6\u5e76\u8bfb\u53d6\u5185\u5bb9\uff0c\u5982\u679c\u8bfb\u53d6\u5230\u7684\u6570\u636e\u957f\u5ea6\u4e3a0\uff0c\u4e5f\u8bf4\u660e\u6587\u4ef6\u6ca1\u6709\u6570\u636e\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u65f6\uff0c\u5982\u4f55\u5904\u7406\u6587\u4ef6\u4e0d\u5b58\u5728\u7684\u60c5\u51b5\uff1f<\/strong><br \/>\u5728\u8bfb\u53d6\u6587\u4ef6\u4e4b\u524d\uff0c\u5efa\u8bae\u4f7f\u7528<code>os.path.exists()<\/code>\u51fd\u6570\u68c0\u67e5\u6587\u4ef6\u662f\u5426\u5b58\u5728\u3002\u5982\u679c\u6587\u4ef6\u4e0d\u5b58\u5728\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try...except<\/code>\u8bed\u53e5\u6765\u6355\u83b7\u53ef\u80fd\u7684\u5f02\u5e38\uff0c\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u5904\u7406\uff0c\u6bd4\u5982\u8f93\u51fa\u63d0\u793a\u4fe1\u606f\u6216\u521b\u5efa\u65b0\u6587\u4ef6\u3002<\/p>\n<p><strong>\u5982\u4f55\u5224\u65ad\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u7684\u5185\u5bb9\u662f\u5426\u4ec5\u5305\u542b\u7a7a\u683c\u6216\u6362\u884c\u7b26\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u5e76\u4f7f\u7528<code>strip()<\/code>\u65b9\u6cd5\u53bb\u9664\u4e24\u7aef\u7684\u7a7a\u767d\u5b57\u7b26\u3002\u5982\u679c\u53bb\u9664\u540e\u5f97\u5230\u7684\u5b57\u7b26\u4e32\u4e3a\u7a7a\uff0c\u8bf4\u660e\u6587\u4ef6\u7684\u5185\u5bb9\u4ec5\u5305\u542b\u7a7a\u683c\u6216\u6362\u884c\u7b26\u3002\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u6587\u4ef6\u867d\u7136\u5b58\u5728\uff0c\u4f46\u5b9e\u9645\u4e0a\u6ca1\u6709\u6709\u6548\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5224\u65ad\u6587\u4ef6\u4e2d\u6709\u6ca1\u6709\u6570\u636e\uff0c\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u51e0\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\uff0c\u5982\uff1a\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f\u3001\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u3001\u5c1d\u8bd5\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684 [&hellip;]","protected":false},"author":3,"featured_media":1119296,"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\/1119289"}],"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=1119289"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1119289\/revisions"}],"predecessor-version":[{"id":1119298,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1119289\/revisions\/1119298"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1119296"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1119289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1119289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1119289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}