{"id":1089350,"date":"2025-01-08T13:52:47","date_gmt":"2025-01-08T05:52:47","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1089350.html"},"modified":"2025-01-08T13:52:50","modified_gmt":"2025-01-08T05:52:50","slug":"python%e5%a6%82%e4%bd%95%e5%b0%86bin%e6%95%b0%e6%8d%ae%e5%81%9a%e8%bf%90%e7%ae%97-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1089350.html","title":{"rendered":"python\u5982\u4f55\u5c06bin\u6570\u636e\u505a\u8fd0\u7b97"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24202315\/1ab02695-ec61-4b1f-a899-4c93841d4071.webp\" alt=\"python\u5982\u4f55\u5c06bin\u6570\u636e\u505a\u8fd0\u7b97\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u5e76\u8fdb\u884c\u8fd0\u7b97\u7684\u4e3b\u8981\u65b9\u5f0f\u662f\u4f7f\u7528\u5185\u7f6e\u7684\u51fd\u6570\u548c\u5e93\u6765\u5b8c\u6210\u8fd9\u4e9b\u4efb\u52a1\u3002<strong>\u4f7f\u7528<code>int<\/code>\u51fd\u6570\u8f6c\u6362\u4e8c\u8fdb\u5236\u4e3a\u6574\u6570\u3001\u4f7f\u7528\u4f4d\u8fd0\u7b97\u7b26\u8fdb\u884c\u8ba1\u7b97\u3001\u4f7f\u7528<code>struct<\/code>\u5e93\u5904\u7406\u590d\u6742\u7684\u4e8c\u8fdb\u5236\u6570\u636e<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528<code>int<\/code>\u51fd\u6570\u8f6c\u6362\u4e8c\u8fdb\u5236\u4e3a\u6574\u6570\u662f\u6700\u4e3a\u57fa\u7840\u548c\u5e38\u89c1\u7684\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u8be6\u7ec6\u8ba8\u8bba\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u5e76\u8fdb\u884c\u8fd0\u7b97\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528 <code>int<\/code> \u51fd\u6570\u8f6c\u6362\u4e8c\u8fdb\u5236\u4e3a\u6574\u6570<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684 <code>int<\/code> \u51fd\u6570\u5c06\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5bf9\u4e8c\u8fdb\u5236\u6570\u636e\u8fdb\u884c\u5404\u79cd\u6570\u5b66\u8fd0\u7b97\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_str = &#39;1010&#39;  # \u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32<\/p>\n<p>integer_value = int(binary_str, 2)  # \u8f6c\u6362\u4e3a\u6574\u6570<\/p>\n<p>print(integer_value)  # \u8f93\u51fa 10<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8f6c\u6362\u540e\u7684\u6574\u6570\u53ef\u4ee5\u76f4\u63a5\u8fdb\u884c\u5404\u79cd\u7b97\u672f\u8fd0\u7b97\uff0c\u5982\u52a0\u6cd5\u3001\u51cf\u6cd5\u3001\u4e58\u6cd5\u548c\u9664\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_str1 = &#39;1010&#39;<\/p>\n<p>binary_str2 = &#39;1100&#39;<\/p>\n<p>int1 = int(binary_str1, 2)<\/p>\n<p>int2 = int(binary_str2, 2)<\/p>\n<h2><strong>\u52a0\u6cd5<\/strong><\/h2>\n<p>result_add = int1 + int2<\/p>\n<p>print(f&quot;\u52a0\u6cd5\u7ed3\u679c: {bin(result_add)}&quot;)<\/p>\n<h2><strong>\u51cf\u6cd5<\/strong><\/h2>\n<p>result_sub = int1 - int2<\/p>\n<p>print(f&quot;\u51cf\u6cd5\u7ed3\u679c: {bin(result_sub)}&quot;)<\/p>\n<h2><strong>\u4e58\u6cd5<\/strong><\/h2>\n<p>result_mul = int1 * int2<\/p>\n<p>print(f&quot;\u4e58\u6cd5\u7ed3\u679c: {bin(result_mul)}&quot;)<\/p>\n<h2><strong>\u9664\u6cd5<\/strong><\/h2>\n<p>result_div = int1 \/\/ int2<\/p>\n<p>print(f&quot;\u9664\u6cd5\u7ed3\u679c: {bin(result_div)}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u4f4d\u8fd0\u7b97\u7b26\u8fdb\u884c\u8ba1\u7b97<\/h3>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u4f4d\u8fd0\u7b97\u7b26\uff0c\u53ef\u4ee5\u76f4\u63a5\u5bf9\u4e8c\u8fdb\u5236\u6570\u636e\u8fdb\u884c\u64cd\u4f5c\u3002\u5e38\u7528\u7684\u4f4d\u8fd0\u7b97\u7b26\u5305\u62ec\uff1a<code>&amp;<\/code> (\u6309\u4f4d\u4e0e)\uff0c<code>|<\/code> (\u6309\u4f4d\u6216)\uff0c<code>^<\/code> (\u6309\u4f4d\u5f02\u6216)\uff0c<code>~<\/code> (\u6309\u4f4d\u53d6\u53cd)\uff0c\u4ee5\u53ca\u5de6\u79fb\u548c\u53f3\u79fb\u8fd0\u7b97\u7b26 <code>&lt;&lt;<\/code> \u548c <code>&gt;&gt;<\/code>\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a = 0b1010  # \u4e8c\u8fdb\u5236\u6570<\/p>\n<p>b = 0b1100<\/p>\n<h2><strong>\u6309\u4f4d\u4e0e<\/strong><\/h2>\n<p>result_and = a &amp; b<\/p>\n<p>print(f&quot;\u6309\u4f4d\u4e0e\u7ed3\u679c: {bin(result_and)}&quot;)<\/p>\n<h2><strong>\u6309\u4f4d\u6216<\/strong><\/h2>\n<p>result_or = a | b<\/p>\n<p>print(f&quot;\u6309\u4f4d\u6216\u7ed3\u679c: {bin(result_or)}&quot;)<\/p>\n<h2><strong>\u6309\u4f4d\u5f02\u6216<\/strong><\/h2>\n<p>result_xor = a ^ b<\/p>\n<p>print(f&quot;\u6309\u4f4d\u5f02\u6216\u7ed3\u679c: {bin(result_xor)}&quot;)<\/p>\n<h2><strong>\u6309\u4f4d\u53d6\u53cd<\/strong><\/h2>\n<p>result_not = ~a<\/p>\n<p>print(f&quot;\u6309\u4f4d\u53d6\u53cd\u7ed3\u679c: {bin(result_not)}&quot;)<\/p>\n<h2><strong>\u5de6\u79fb<\/strong><\/h2>\n<p>result_left_shift = a &lt;&lt; 2<\/p>\n<p>print(f&quot;\u5de6\u79fb\u7ed3\u679c: {bin(result_left_shift)}&quot;)<\/p>\n<h2><strong>\u53f3\u79fb<\/strong><\/h2>\n<p>result_right_shift = a &gt;&gt; 2<\/p>\n<p>print(f&quot;\u53f3\u79fb\u7ed3\u679c: {bin(result_right_shift)}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528 <code>struct<\/code> \u5e93\u5904\u7406\u590d\u6742\u7684\u4e8c\u8fdb\u5236\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u4e8c\u8fdb\u5236\u6570\u636e\u7ed3\u6784\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>struct<\/code> \u5e93\u8fdb\u884c\u5904\u7406\u3002<code>struct<\/code> \u5e93\u53ef\u4ee5\u5c06\u4e8c\u8fdb\u5236\u6570\u636e\u6253\u5305\u6210\u5b57\u8282\u5bf9\u8c61\uff0c\u5e76\u4ece\u5b57\u8282\u5bf9\u8c61\u4e2d\u89e3\u5305\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import struct<\/p>\n<h2><strong>\u5c06\u6574\u6570\u6253\u5305\u6210\u4e8c\u8fdb\u5236\u6570\u636e<\/strong><\/h2>\n<p>data = struct.pack(&#39;i&#39;, 42)<\/p>\n<p>print(f&quot;\u6253\u5305\u540e\u7684\u4e8c\u8fdb\u5236\u6570\u636e: {data}&quot;)<\/p>\n<h2><strong>\u4ece\u4e8c\u8fdb\u5236\u6570\u636e\u89e3\u5305\u6210\u6574\u6570<\/strong><\/h2>\n<p>unpacked_data = struct.unpack(&#39;i&#39;, data)[0]<\/p>\n<p>print(f&quot;\u89e3\u5305\u540e\u7684\u6574\u6570: {unpacked_data}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u8bfb\u53d6\u548c\u5199\u5165\u4e8c\u8fdb\u5236\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u8bfb\u53d6\u548c\u5199\u5165\u4e8c\u8fdb\u5236\u6587\u4ef6\u3002Python\u7684\u5185\u7f6e <code>open<\/code> \u51fd\u6570\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b8c\u6210\u8fd9\u9879\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5199\u5165\u4e8c\u8fdb\u5236\u6587\u4ef6<\/p>\n<p>with open(&#39;binary_file.bin&#39;, &#39;wb&#39;) as file:<\/p>\n<p>    file.write(struct.pack(&#39;i&#39;, 42))<\/p>\n<h2><strong>\u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6<\/strong><\/h2>\n<p>with open(&#39;binary_file.bin&#39;, &#39;rb&#39;) as file:<\/p>\n<p>    data = file.read()<\/p>\n<p>    unpacked_data = struct.unpack(&#39;i&#39;, data)[0]<\/p>\n<p>    print(f&quot;\u4ece\u4e8c\u8fdb\u5236\u6587\u4ef6\u4e2d\u8bfb\u53d6\u7684\u6570\u636e: {unpacked_data}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5904\u7406\u5927\u6570\u636e\u91cf\u7684\u4e8c\u8fdb\u5236\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u9700\u8981\u5904\u7406\u5927\u91cf\u4e8c\u8fdb\u5236\u6570\u636e\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>numpy<\/code> \u5e93\u3002<code>numpy<\/code> \u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u6570\u7ec4\u64cd\u4f5c\uff0c\u9002\u5408\u5904\u7406\u5927\u6570\u636e\u91cf\u7684\u4e8c\u8fdb\u5236\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\u7ec4<\/strong><\/h2>\n<p>binary_array = np.array([0b1010, 0b1100, 0b1110], dtype=np.int32)<\/p>\n<h2><strong>\u8fdb\u884c\u6570\u7ec4\u8fd0\u7b97<\/strong><\/h2>\n<p>result_array = binary_array * 2<\/p>\n<p>print(f&quot;\u6570\u7ec4\u8fd0\u7b97\u7ed3\u679c: {result_array}&quot;)<\/p>\n<h2><strong>\u6570\u7ec4\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32<\/strong><\/h2>\n<p>binary_strings = [bin(x) for x in result_array]<\/p>\n<p>print(f&quot;\u6570\u7ec4\u8f6c\u6362\u540e\u7684\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32: {binary_strings}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u5e94\u7528\u5b9e\u4f8b\uff1aCRC\u6821\u9a8c<\/h3>\n<\/p>\n<p><p>CRC\u6821\u9a8c\uff08\u5faa\u73af\u5197\u4f59\u6821\u9a8c\uff09\u662f\u6570\u636e\u901a\u4fe1\u4e2d\u5e38\u7528\u7684\u4e00\u79cd\u6821\u9a8c\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528Python\u5b9e\u73b0CRC\u6821\u9a8c\u7684\u5b9e\u4f8b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def crc16(data: bytes) -&gt; int:<\/p>\n<p>    poly = 0x1021<\/p>\n<p>    crc = 0xFFFF<\/p>\n<p>    for byte in data:<\/p>\n<p>        crc ^= byte &lt;&lt; 8<\/p>\n<p>        for _ in range(8):<\/p>\n<p>            if crc &amp; 0x8000:<\/p>\n<p>                crc = (crc &lt;&lt; 1) ^ poly<\/p>\n<p>            else:<\/p>\n<p>                crc &lt;&lt;= 1<\/p>\n<p>            crc &amp;= 0xFFFF<\/p>\n<p>    return crc<\/p>\n<p>data = b&#39;123456789&#39;<\/p>\n<p>crc_value = crc16(data)<\/p>\n<p>print(f&quot;CRC\u6821\u9a8c\u503c: {hex(crc_value)}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u4ecb\u7ecd\uff0c\u60a8\u53ef\u4ee5\u770b\u5230Python\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5de5\u5177\u548c\u5e93\u6765\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u5e76\u8fdb\u884c\u8fd0\u7b97\u3002<strong>\u4f7f\u7528<code>int<\/code>\u51fd\u6570\u8f6c\u6362\u4e8c\u8fdb\u5236\u4e3a\u6574\u6570\u3001\u4f7f\u7528\u4f4d\u8fd0\u7b97\u7b26\u8fdb\u884c\u8ba1\u7b97\u3001\u4f7f\u7528<code>struct<\/code>\u5e93\u5904\u7406\u590d\u6742\u7684\u4e8c\u8fdb\u5236\u6570\u636e<\/strong>\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u6ee1\u8db3\u5927\u591a\u6570\u4e8c\u8fdb\u5236\u6570\u636e\u5904\u7406\u7684\u9700\u6c42\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u60c5\u51b5\u9009\u62e9\u5408\u9002\u7684\u5de5\u5177\u548c\u65b9\u6cd5\uff0c\u4ee5\u9ad8\u6548\u5730\u5b8c\u6210\u6570\u636e\u5904\u7406\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u7406\u89e3\u548c\u638c\u63e1\u5728Python\u4e2d\u5982\u4f55\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u5e76\u8fdb\u884c\u8fd0\u7b97\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8bfb\u53d6\u548c\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u4ee5\u4e8c\u8fdb\u5236\u6a21\u5f0f\u8bfb\u53d6\u6587\u4ef6\u3002\u4f7f\u7528<code>with open(&#39;filename&#39;, &#39;rb&#39;) as file:<\/code>\u53ef\u4ee5\u786e\u4fdd\u6587\u4ef6\u5728\u8bfb\u53d6\u540e\u81ea\u52a8\u5173\u95ed\u3002\u8bfb\u53d6\u7684\u4e8c\u8fdb\u5236\u6570\u636e\u53ef\u4ee5\u901a\u8fc7<code>file.read()<\/code>\u83b7\u53d6\uff0c\u5e76\u53ef\u4ee5\u901a\u8fc7<code>struct<\/code>\u6a21\u5757\u5c06\u5176\u8f6c\u6362\u4e3a\u5176\u4ed6\u6570\u636e\u7c7b\u578b\uff0c\u65b9\u4fbf\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u8fd0\u7b97\u3002<\/p>\n<p><strong>Python\u4e2d\u6709\u54ea\u4e9b\u6a21\u5757\u53ef\u4ee5\u5904\u7406\u4e8c\u8fdb\u5236\u8fd0\u7b97\uff1f<\/strong><br \/>Python\u63d0\u4f9b\u4e86\u591a\u4e2a\u6a21\u5757\u6765\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\uff0c\u4f8b\u5982<code>struct<\/code>\u6a21\u5757\u53ef\u4ee5\u7528\u4e8e\u89e3\u6790\u548c\u6253\u5305\u4e8c\u8fdb\u5236\u6570\u636e\uff0c<code>bitarray<\/code>\u6a21\u5757\u5219\u53ef\u4ee5\u9ad8\u6548\u5730\u5904\u7406\u548c\u8fd0\u7b97\u6bd4\u7279\u6570\u7ec4\u3002\u4f7f\u7528\u8fd9\u4e9b\u6a21\u5757\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u5404\u79cd\u8fd0\u7b97\uff0c\u5982\u4f4d\u79fb\u3001\u6309\u4f4d\u4e0e\u3001\u6309\u4f4d\u6216\u7b49\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5c06\u4e8c\u8fdb\u5236\u6570\u636e\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u6216\u5341\u516d\u8fdb\u5236\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<code>int()<\/code>\u5c06\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u6574\u6570\uff0c\u65b9\u6cd5\u662f\u901a\u8fc7\u6307\u5b9a\u57fa\u6570\u4e3a2\uff0c\u4f8b\u5982<code>int(&#39;1010&#39;, 2)<\/code>\u4f1a\u8fd4\u56de10\u3002\u8981\u5c06\u4e8c\u8fdb\u5236\u6570\u636e\u8f6c\u6362\u4e3a\u5341\u516d\u8fdb\u5236\uff0c\u53ef\u4ee5\u5148\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\uff0c\u7136\u540e\u4f7f\u7528<code>hex()<\/code>\u51fd\u6570\uff0c\u6216\u8005\u4f7f\u7528<code>format()<\/code>\u51fd\u6570\uff0c\u4f8b\u5982<code>format(int(&#39;1010&#39;, 2), &#39;x&#39;)<\/code>\u5c06\u8fd4\u56de<code>a<\/code>\u3002\u8fd9\u4e9b\u8f6c\u6362\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u66f4\u597d\u5730\u7406\u89e3\u548c\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5904\u7406\u4e8c\u8fdb\u5236\u6570\u636e\u5e76\u8fdb\u884c\u8fd0\u7b97\u7684\u4e3b\u8981\u65b9\u5f0f\u662f\u4f7f\u7528\u5185\u7f6e\u7684\u51fd\u6570\u548c\u5e93\u6765\u5b8c\u6210\u8fd9\u4e9b\u4efb\u52a1\u3002\u4f7f\u7528int\u51fd\u6570\u8f6c\u6362\u4e8c\u8fdb\u5236 [&hellip;]","protected":false},"author":3,"featured_media":1089365,"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\/1089350"}],"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=1089350"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1089350\/revisions"}],"predecessor-version":[{"id":1089369,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1089350\/revisions\/1089369"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1089365"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1089350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1089350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1089350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}