{"id":1097155,"date":"2025-01-08T15:09:00","date_gmt":"2025-01-08T07:09:00","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1097155.html"},"modified":"2025-01-08T15:09:02","modified_gmt":"2025-01-08T07:09:02","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e8%be%93%e5%85%a5%e4%ba%8c%e8%bf%9b%e5%88%b6-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1097155.html","title":{"rendered":"\u5982\u4f55\u7528python\u8f93\u5165\u4e8c\u8fdb\u5236"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24212056\/8f8548bd-28b4-4287-8751-919fe90327d0.webp\" alt=\"\u5982\u4f55\u7528python\u8f93\u5165\u4e8c\u8fdb\u5236\" \/><\/p>\n<p><p> <strong>\u7528Python\u8f93\u5165\u4e8c\u8fdb\u5236\u6709\u51e0\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528\u5185\u7f6e\u51fd\u6570bin()\u3001\u4f7f\u7528int()\u51fd\u6570\u6307\u5b9a\u57fa\u6570\u3001\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u3002<\/strong> \u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u4e00\u79cd\u65b9\u6cd5\uff0c\u4f7f\u7528\u5185\u7f6e\u51fd\u6570bin()\u3002<\/p>\n<\/p>\n<p><p>\u8981\u7528Python\u8f93\u5165\u4e8c\u8fdb\u5236\uff0c\u9996\u5148\u9700\u8981\u7406\u89e3\u4e8c\u8fdb\u5236\u7684\u57fa\u672c\u6982\u5ff5\u3002\u4e8c\u8fdb\u5236\u662f\u8ba1\u7b97\u673a\u7684\u57fa\u7840\u8bed\u8a00\uff0c\u5b83\u4f7f\u75280\u548c1\u6765\u8868\u793a\u6240\u6709\u6570\u636e\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u5f0f\u6765\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\uff0c\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u51e0\u79cd\u5e38\u89c1\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528bin()\u51fd\u6570<\/h3>\n<\/p>\n<p><p>bin()\u51fd\u6570\u662fPython\u5185\u7f6e\u7684\u4e00\u4e2a\u51fd\u6570\uff0c\u7528\u4e8e\u5c06\u4e00\u4e2a\u6574\u6570\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u3002\u8fd9\u4e2a\u51fd\u6570\u975e\u5e38\u7b80\u5355\u6613\u7528\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 10<\/p>\n<p>binary_representation = bin(number)<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 0b1010<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u51fd\u6570\u4f1a\u8fd4\u56de\u4e00\u4e2a\u4ee5\u201c0b\u201d\u5f00\u5934\u7684\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u5207\u7247\u64cd\u4f5c\u53bb\u6389\u201c0b\u201d\u524d\u7f00\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_representation = bin(number)[2:]<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 1010<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528int()\u51fd\u6570\u6307\u5b9a\u57fa\u6570<\/h3>\n<\/p>\n<p><p>int()\u51fd\u6570\u53ef\u4ee5\u7528\u6765\u5c06\u4e0d\u540c\u8fdb\u5236\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u901a\u8fc7\u6307\u5b9a\u7b2c\u4e8c\u4e2a\u53c2\u6570\u4e3a2\uff0c\u53ef\u4ee5\u5c06\u4e00\u4e2a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_string = &quot;1010&quot;<\/p>\n<p>number = int(binary_string, 2)<\/p>\n<p>print(number)  # \u8f93\u51fa: 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32<\/h3>\n<\/p>\n<p><p>Python\u7684\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u4e5f\u53ef\u4ee5\u7528\u6765\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u5c06\u6574\u6570\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 10<\/p>\n<p>binary_representation = &quot;{:b}&quot;.format(number)<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 1010<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216\u8005\u4f7f\u7528f-string\uff08Python 3.6\u53ca\u4ee5\u4e0a\u7248\u672c\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">number = 10<\/p>\n<p>binary_representation = f&quot;{number:b}&quot;<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 1010<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5c06\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u65f6\uff0c\u6709\u65f6\u9700\u8981\u5c06\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u3002\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5185\u7f6e\u51fd\u6570bytes()\u6765\u5b9e\u73b0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_string = &quot;1010&quot;<\/p>\n<p>byte_data = bytes([int(binary_string, 2)])<\/p>\n<p>print(byte_data)  # \u8f93\u51fa: b&#39;\\n&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u7ecf\u5e38\u9700\u8981\u8bfb\u53d6\u548c\u5904\u7406\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002Python\u63d0\u4f9b\u4e86\u5185\u7f6e\u7684open()\u51fd\u6570\u6765\u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&quot;example.bin&quot;, &quot;rb&quot;) as file:<\/p>\n<p>    binary_data = file.read()<\/p>\n<p>    print(binary_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5199\u5165\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u540c\u6837\uff0cPython\u4e5f\u63d0\u4f9b\u4e86\u5199\u5165\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u529f\u80fd\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_data = b&#39;\\x01\\x02\\x03\\x04&#39;<\/p>\n<p>with open(&quot;output.bin&quot;, &quot;wb&quot;) as file:<\/p>\n<p>    file.write(binary_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u4f7f\u7528struct\u6a21\u5757<\/h3>\n<\/p>\n<p><p>struct\u6a21\u5757\u63d0\u4f9b\u4e86\u5c06\u4e8c\u8fdb\u5236\u6570\u636e\u548cPython\u5bf9\u8c61\u4e92\u76f8\u8f6c\u6362\u7684\u529f\u80fd\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import struct<\/p>\n<p>binary_data = struct.pack(&quot;i&quot;, 10)  # \u5c06\u6574\u657010\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u6570\u636e<\/p>\n<p>print(binary_data)  # \u8f93\u51fa: b&#39;\\n\\x00\\x00\\x00&#39;<\/p>\n<p>number = struct.unpack(&quot;i&quot;, binary_data)[0]  # \u5c06\u4e8c\u8fdb\u5236\u6570\u636e\u8f6c\u6362\u4e3a\u6574\u6570<\/p>\n<p>print(number)  # \u8f93\u51fa: 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u4f7f\u7528bitarray\u6a21\u5757<\/h3>\n<\/p>\n<p><p>bitarray\u662f\u4e00\u4e2a\u7b2c\u4e09\u65b9\u6a21\u5757\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u3002\u9996\u5148\u9700\u8981\u5b89\u88c5bitarray\u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install bitarray<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bitarray import bitarray<\/p>\n<p>binary_string = &quot;1010&quot;<\/p>\n<p>bit_array = bitarray(binary_string)<\/p>\n<p>print(bit_array)  # \u8f93\u51fa: bitarray(&#39;1010&#39;)<\/p>\n<p>number = int(bit_array.to01(), 2)<\/p>\n<p>print(number)  # \u8f93\u51fa: 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u4f7f\u7528NumPy\u5e93<\/h3>\n<\/p>\n<p><p>NumPy\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u4e8c\u8fdb\u5236\u6570\u636e\u5904\u7406\u529f\u80fd\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>binary_string = &quot;1010&quot;<\/p>\n<p>binary_data = np.fromstring(binary_string, dtype=np.uint8)<\/p>\n<p>print(binary_data)  # \u8f93\u51fa: [49 48 49 48]<\/p>\n<p>number = int(&quot;&quot;.join(map(chr, binary_data)), 2)<\/p>\n<p>print(number)  # \u8f93\u51fa: 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u5341\u3001\u4f7f\u7528bitstring\u6a21\u5757<\/h3>\n<\/p>\n<p><p>bitstring\u662f\u53e6\u4e00\u4e2a\u5f3a\u5927\u7684\u7b2c\u4e09\u65b9\u6a21\u5757\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5904\u7406\u548c\u64cd\u4f5c\u4e8c\u8fdb\u5236\u6570\u636e\u3002\u9996\u5148\u9700\u8981\u5b89\u88c5bitstring\u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install bitstring<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bitstring import BitArray<\/p>\n<p>binary_string = &quot;1010&quot;<\/p>\n<p>bit_array = BitArray(bin=binary_string)<\/p>\n<p>print(bit_array)  # \u8f93\u51fa: BitArray(&#39;0b1010&#39;)<\/p>\n<p>number = bit_array.uint<\/p>\n<p>print(number)  # \u8f93\u51fa: 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u5f0f\u6765\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\uff0c\u5305\u62ec\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u3001\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u3001\u8bfb\u53d6\u548c\u5199\u5165\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u6a21\u5757\u7b49\u3002\u9009\u62e9\u9002\u5408\u81ea\u5df1\u9700\u6c42\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u9ad8\u6548\u5730\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8f93\u5165\u4e8c\u8fdb\u5236\u6570\uff1f<\/strong><br \/>\u60a8\u53ef\u4ee5\u4f7f\u7528<code>input()<\/code>\u51fd\u6570\u6765\u63a5\u6536\u7528\u6237\u8f93\u5165\uff0c\u5e76\u7ed3\u5408Python\u7684\u5185\u7f6e\u51fd\u6570\u5c06\u5176\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u4f8b\u5982\uff0c\u901a\u8fc7\u8f93\u5165\u4e00\u4e2a\u4ee5&#39;0b&#39;\u5f00\u5934\u7684\u5b57\u7b26\u4e32\uff0cPython\u4f1a\u81ea\u52a8\u5c06\u5176\u89e3\u91ca\u4e3a\u4e8c\u8fdb\u5236\u6570\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">binary_input = input(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\uff08\u4f8b\u5982\uff1a0b101\uff09\uff1a&quot;)\ndecimal_output = int(binary_input, 2)\nprint(&quot;\u5bf9\u5e94\u7684\u5341\u8fdb\u5236\u6570\u662f\uff1a&quot;, decimal_output)\n<\/code><\/pre>\n<p><strong>Python\u662f\u5426\u652f\u6301\u76f4\u63a5\u8f93\u5165\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\uff1f<\/strong><br \/>\u662f\u7684\uff0cPython\u5141\u8bb8\u76f4\u63a5\u8f93\u5165\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u3002\u60a8\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165\u4ee5&#39;0b&#39;\u5f00\u5934\u7684\u4e8c\u8fdb\u5236\u6570\u3002\u901a\u8fc7<code>int()<\/code>\u51fd\u6570\u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\uff0c\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u8f6c\u4e3a\u5341\u8fdb\u5236\u6570\u3002\u4f8b\u5982\uff0c\u8f93\u5165<code>0b1101<\/code>\u5c06\u8f6c\u6362\u4e3a13\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u7528\u6237\u8f93\u5165\u7684\u4e8c\u8fdb\u5236\u6570\u4e2d\u7684\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>try-except<\/code>\u7ed3\u6784\u6765\u6355\u83b7\u53ef\u80fd\u7684\u9519\u8bef\u3002\u4f8b\u5982\uff0c\u5f53\u7528\u6237\u8f93\u5165\u4e00\u4e2a\u65e0\u6548\u7684\u4e8c\u8fdb\u5236\u6570\u65f6\uff0c\u60a8\u53ef\u4ee5\u6355\u83b7<code>ValueError<\/code>\u5e76\u7ed9\u51fa\u63d0\u793a\u3002\u4ee3\u7801\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">binary_input = input(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\uff1a&quot;)\ntry:\n    decimal_output = int(binary_input, 2)\n    print(&quot;\u5bf9\u5e94\u7684\u5341\u8fdb\u5236\u6570\u662f\uff1a&quot;, decimal_output)\nexcept ValueError:\n    print(&quot;\u8f93\u5165\u7684\u4e0d\u662f\u6709\u6548\u7684\u4e8c\u8fdb\u5236\u6570\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002&quot;)\n<\/code><\/pre>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5c06\u4e8c\u8fdb\u5236\u6570\u8f6c\u6362\u4e3a\u5176\u4ed6\u8fdb\u5236\uff1f<\/strong><br \/>\u5c06\u4e8c\u8fdb\u5236\u6570\u8f6c\u6362\u4e3a\u5176\u4ed6\u8fdb\u5236\u975e\u5e38\u7b80\u5355\u3002\u9996\u5148\uff0c\u60a8\u53ef\u4ee5\u5c06\u4e8c\u8fdb\u5236\u6570\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u6570\uff0c\u7136\u540e\u518d\u5c06\u5176\u8f6c\u6362\u4e3a\u6240\u9700\u7684\u8fdb\u5236\u3002\u4f8b\u5982\uff0c\u5c06\u4e8c\u8fdb\u5236\u6570\u8f6c\u6362\u4e3a\u516b\u8fdb\u5236\u6216\u5341\u516d\u8fdb\u5236\u53ef\u4ee5\u4f7f\u7528<code>oct()<\/code>\u548c<code>hex()<\/code>\u51fd\u6570\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">binary_input = input(&quot;\u8bf7\u8f93\u5165\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\uff1a&quot;)\ndecimal_output = int(binary_input, 2)\n\noctal_output = oct(decimal_output)\nhexadecimal_output = hex(decimal_output)\n\nprint(&quot;\u516b\u8fdb\u5236\u8868\u793a\uff1a&quot;, octal_output)\nprint(&quot;\u5341\u516d\u8fdb\u5236\u8868\u793a\uff1a&quot;, hexadecimal_output)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u7528Python\u8f93\u5165\u4e8c\u8fdb\u5236\u6709\u51e0\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528\u5185\u7f6e\u51fd\u6570bin()\u3001\u4f7f\u7528int()\u51fd\u6570\u6307\u5b9a\u57fa\u6570\u3001\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u3002 \u4e0b [&hellip;]","protected":false},"author":3,"featured_media":1097164,"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\/1097155"}],"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=1097155"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1097155\/revisions"}],"predecessor-version":[{"id":1097166,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1097155\/revisions\/1097166"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1097164"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1097155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1097155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1097155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}