{"id":1147124,"date":"2025-01-08T23:22:40","date_gmt":"2025-01-08T15:22:40","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1147124.html"},"modified":"2025-01-08T23:22:42","modified_gmt":"2025-01-08T15:22:42","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e5%b0%86%e4%b8%80%e4%b8%aa%e5%ad%97%e7%ac%a6%e8%bd%ac%e4%b8%ba%e4%ba%8c%e8%bf%9b%e5%88%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1147124.html","title":{"rendered":"\u5982\u4f55\u7528python\u5c06\u4e00\u4e2a\u5b57\u7b26\u8f6c\u4e3a\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\/24182837\/01e2efe5-6c91-4220-9fcc-1859d9fe3680.webp\" alt=\"\u5982\u4f55\u7528python\u5c06\u4e00\u4e2a\u5b57\u7b26\u8f6c\u4e3a\u4e8c\u8fdb\u5236\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u5c06\u4e00\u4e2a\u5b57\u7b26\u8f6c\u4e3a\u4e8c\u8fdb\u5236\u7684\u4e3b\u8981\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<code>bin()<\/code>\u3001\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u3001\u624b\u52a8\u8f6c\u6362\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u4e3b\u8981\u53d6\u51b3\u4e8e\u5177\u4f53\u9700\u6c42\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u5c06\u4e00\u4e2a\u5b57\u7b26\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u8868\u793a\u5f62\u5f0f\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\u3002<strong>\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<code>bin()<\/code><\/strong>\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u7b80\u5355\u6613\u7528\u3002\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5b57\u7b26\u8f6c\u6362\u4e3a\u5176ASCII\u7801\u503c\uff0c\u7136\u540e\u518d\u5c06\u8be5\u503c\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0\u66f4\u7075\u6d3b\u7684\u4e8c\u8fdb\u5236\u8f6c\u6362\u3002\u6700\u540e\uff0c\u624b\u52a8\u8f6c\u6362\u5219\u63d0\u4f9b\u4e86\u6700\u5927\u7a0b\u5ea6\u7684\u63a7\u5236\uff0c\u9002\u5408\u4e00\u4e9b\u7279\u5b9a\u9700\u6c42\u7684\u573a\u666f\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u53ca\u5176\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570<code>bin()<\/code><\/h2>\n<\/p>\n<p><h3>1.1 \u57fa\u672c\u7528\u6cd5<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Python\u5185\u7f6e\u7684<code>bin()<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u5c06\u4e00\u4e2a\u6574\u6570\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u3002\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5b57\u7b26\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684ASCII\u7801\u503c\uff0c\u518d\u4f7f\u7528<code>bin()<\/code>\u51fd\u6570\u8fdb\u884c\u8f6c\u6362\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">char = &#39;A&#39;<\/p>\n<p>ascii_value = ord(char)<\/p>\n<p>binary_representation = bin(ascii_value)<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 0b1000001<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c<code>ord()<\/code>\u51fd\u6570\u7528\u4e8e\u5c06\u5b57\u7b26\u8f6c\u6362\u4e3aASCII\u7801\u503c\uff0c\u800c<code>bin()<\/code>\u51fd\u6570\u5219\u5c06ASCII\u7801\u503c\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u3002<strong>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c<code>bin()<\/code>\u51fd\u6570\u7684\u8f93\u51fa\u4f1a\u5e26\u6709\u524d\u7f00\u201c0b\u201d\uff0c\u8868\u793a\u8fd9\u662f\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\u3002<\/strong><\/p>\n<\/p>\n<p><h3>1.2 \u53bb\u6389\u524d\u7f00\u201c0b\u201d<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4e0d\u9700\u8981\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u4e2d\u7684\u201c0b\u201d\u524d\u7f00\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u5207\u7247\u6765\u53bb\u6389\u5b83\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_representation = bin(ascii_value)[2:]<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 1000001<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>1.3 \u8865\u9f50\u4f4d\u6570<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u56fa\u5b9a\u957f\u5ea6\u7684\u4e8c\u8fdb\u5236\u8868\u793a\uff0c\u4f8b\u59828\u4f4d\u3002\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528<code>zfill()<\/code>\u65b9\u6cd5\u8fdb\u884c\u8865\u9f50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">binary_representation = bin(ascii_value)[2:].zfill(8)<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 01000001<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32<\/h2>\n<\/p>\n<p><h3>2.1 \u4f7f\u7528<code>format()<\/code>\u51fd\u6570<\/h3>\n<\/p>\n<p><p>Python\u7684<code>format()<\/code>\u51fd\u6570\u63d0\u4f9b\u4e86\u66f4\u4e3a\u7075\u6d3b\u7684\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u529f\u80fd\uff0c\u53ef\u4ee5\u76f4\u63a5\u5c06\u4e00\u4e2a\u6574\u6570\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">char = &#39;A&#39;<\/p>\n<p>ascii_value = ord(char)<\/p>\n<p>binary_representation = format(ascii_value, &#39;08b&#39;)<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 01000001<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>&#39;08b&#39;<\/code>\u8868\u793a\u5c06\u6574\u6570\u8f6c\u6362\u4e3a8\u4f4d\u7684\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\uff0c\u4e0d\u8db3\u7684\u4f4d\u6570\u75280\u586b\u5145\u3002<\/p>\n<\/p>\n<p><h3>2.2 \u4f7f\u7528f-string<\/h3>\n<\/p>\n<p><p>Python 3.6\u5f15\u5165\u4e86f-string\uff08\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\uff09\uff0c\u4f7f\u5f97\u5b57\u7b26\u4e32\u683c\u5f0f\u5316\u66f4\u52a0\u76f4\u89c2\u548c\u7b80\u6d01\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">char = &#39;A&#39;<\/p>\n<p>ascii_value = ord(char)<\/p>\n<p>binary_representation = f&#39;{ascii_value:08b}&#39;<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 01000001<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e09\u3001\u624b\u52a8\u8f6c\u6362<\/h2>\n<\/p>\n<p><h3>3.1 \u57fa\u672c\u601d\u8def<\/h3>\n<\/p>\n<p><p>\u867d\u7136\u5185\u7f6e\u51fd\u6570\u548c\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u5df2\u7ecf\u8db3\u591f\u65b9\u4fbf\uff0c\u4f46\u6709\u65f6\u6211\u4eec\u9700\u8981\u624b\u52a8\u5b9e\u73b0\u4e8c\u8fdb\u5236\u8f6c\u6362\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u7406\u89e3\u5e95\u5c42\u7ec6\u8282\u3002\u624b\u52a8\u8f6c\u6362\u7684\u57fa\u672c\u601d\u8def\u662f\uff1a\u4e0d\u65ad\u5c06\u6574\u6570\u9664\u4ee52\uff0c\u5e76\u8bb0\u5f55\u4f59\u6570\uff0c\u76f4\u5230\u6574\u6570\u53d8\u4e3a0\uff0c\u7136\u540e\u5c06\u6240\u6709\u4f59\u6570\u9006\u5e8f\u6392\u5217\u3002<\/p>\n<\/p>\n<p><h3>3.2 \u5b9e\u73b0\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u624b\u52a8\u5c06\u5b57\u7b26\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def char_to_binary(char):<\/p>\n<p>    ascii_value = ord(char)<\/p>\n<p>    binary_representation = &#39;&#39;<\/p>\n<p>    while ascii_value &gt; 0:<\/p>\n<p>        binary_representation = str(ascii_value % 2) + binary_representation<\/p>\n<p>        ascii_value \/\/= 2<\/p>\n<p>    return binary_representation.zfill(8)<\/p>\n<p>char = &#39;A&#39;<\/p>\n<p>binary_representation = char_to_binary(char)<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 01000001<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u5b9e\u73b0\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u4e00\u4e2a\u5faa\u73af\u4e0d\u65ad\u5730\u5c06ASCII\u7801\u503c\u9664\u4ee52\uff0c\u5e76\u5c06\u4f59\u6570\u8ffd\u52a0\u5230\u7ed3\u679c\u5b57\u7b26\u4e32\u7684\u524d\u9762\u3002\u6700\u7ec8\u7ed3\u679c\u540c\u6837\u4f7f\u7528<code>zfill()<\/code>\u65b9\u6cd5\u8865\u9f50\u4e3a8\u4f4d\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u7efc\u5408\u5e94\u7528<\/h2>\n<\/p>\n<p><h3>4.1 \u6279\u91cf\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u5c06\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\u90fd\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u8868\u793a\u3002\u53ef\u4ee5\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u6765\u7b80\u5316\u8fd9\u4e00\u8fc7\u7a0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def string_to_binary(string):<\/p>\n<p>    return &#39; &#39;.join(format(ord(char), &#39;08b&#39;) for char in string)<\/p>\n<p>input_string = &quot;Hello&quot;<\/p>\n<p>binary_representation = string_to_binary(input_string)<\/p>\n<p>print(binary_representation)  # \u8f93\u51fa: 01001000 01100101 01101100 01101100 01101111<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4.2 \u9006\u5411\u8f6c\u6362<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u6211\u4eec\u8fd8\u9700\u8981\u5c06\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u56de\u5b57\u7b26\uff0c\u8fd9\u53ef\u4ee5\u901a\u8fc7<code>int()<\/code>\u51fd\u6570\u548c<code>chr()<\/code>\u51fd\u6570\u5b9e\u73b0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def binary_to_char(binary_string):<\/p>\n<p>    ascii_value = int(binary_string, 2)<\/p>\n<p>    return chr(ascii_value)<\/p>\n<p>binary_string = &#39;01000001&#39;<\/p>\n<p>char = binary_to_char(binary_string)<\/p>\n<p>print(char)  # \u8f93\u51fa: A<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>4.3 \u9519\u8bef\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u65f6\uff0c\u6211\u4eec\u9700\u8981\u786e\u4fdd\u8f93\u5165\u7684\u5b57\u7b26\u548c\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u90fd\u662f\u6709\u6548\u7684\u3002\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0\u9519\u8bef\u5904\u7406\u6765\u589e\u5f3a\u4ee3\u7801\u7684\u9c81\u68d2\u6027\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def <a href=\"https:\/\/docs.pingcode.com\/agile\/agile-at-scale\/what-is-safe\" target=\"_blank\">SAFe<\/a>_char_to_binary(char):<\/p>\n<p>    if len(char) != 1:<\/p>\n<p>        r<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>se ValueError(&quot;Input must be a single character&quot;)<\/p>\n<p>    return format(ord(char), &#39;08b&#39;)<\/p>\n<p>def safe_binary_to_char(binary_string):<\/p>\n<p>    if len(binary_string) != 8 or not all(bit in &#39;01&#39; for bit in binary_string):<\/p>\n<p>        raise ValueError(&quot;Input must be an 8-bit binary string&quot;)<\/p>\n<p>    return chr(int(binary_string, 2))<\/p>\n<p>try:<\/p>\n<p>    char = &#39;A&#39;<\/p>\n<p>    binary_representation = safe_char_to_binary(char)<\/p>\n<p>    print(binary_representation)  # \u8f93\u51fa: 01000001<\/p>\n<p>    char_back = safe_binary_to_char(binary_representation)<\/p>\n<p>    print(char_back)  # \u8f93\u51fa: A<\/p>\n<p>except ValueError as e:<\/p>\n<p>    print(f&quot;Error: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u6709\u6548\u5730\u5c06\u5b57\u7b26\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u8868\u793a\uff0c\u5e76\u5728\u9700\u8981\u65f6\u8fdb\u884c\u9006\u5411\u8f6c\u6362\u3002\u8fd9\u4e9b\u6280\u672f\u5728\u6570\u636e\u4f20\u8f93\u3001\u52a0\u5bc6\u548c\u89e3\u5bc6\u7b49\u9886\u57df\u90fd\u6709\u5e7f\u6cdb\u7684\u5e94\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u5b57\u7b26\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>ord()<\/code>\u51fd\u6570\u5c06\u5b57\u7b26\u8f6c\u6362\u4e3a\u5176\u5bf9\u5e94\u7684ASCII\u503c\uff0c\u7136\u540e\u4f7f\u7528<code>bin()<\/code>\u51fd\u6570\u5c06\u8fd9\u4e2a\u6570\u5b57\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">char = &#39;A&#39;  # \u793a\u4f8b\u5b57\u7b26\nbinary_value = bin(ord(char))[2:]  # \u53bb\u6389&#39;0b&#39;\u524d\u7f00\nprint(binary_value)  # \u8f93\u51fa\uff1a1000001\n<\/code><\/pre>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5c06\u591a\u4e2a\u5b57\u7b26\u540c\u65f6\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u5faa\u73af\u904d\u5386\u5b57\u7b26\u4e32\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\uff0c\u5206\u522b\u5c06\u5176\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\uff1a  <\/p>\n<pre><code class=\"language-python\">string = &#39;ABC&#39;  # \u793a\u4f8b\u5b57\u7b26\u4e32\nbinary_values = [bin(ord(char))[2:] for char in string]  # \u5217\u8868\u63a8\u5bfc\u5f0f\nprint(binary_values)  # \u8f93\u51fa\uff1a[&#39;1000001&#39;, &#39;1000010&#39;, &#39;1000011&#39;]\n<\/code><\/pre>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u56de\u5b57\u7b26\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528<code>int()<\/code>\u51fd\u6570\u5c06\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u7136\u540e\u4f7f\u7528<code>chr()<\/code>\u51fd\u6570\u5c06\u5176\u8f6c\u6362\u4e3a\u5bf9\u5e94\u7684\u5b57\u7b26\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">binary_string = &#39;1000001&#39;  # \u793a\u4f8b\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32\ncharacter = chr(int(binary_string, 2))  # \u5148\u8f6c\u6362\u4e3a\u6574\u6570\uff0c\u518d\u8f6c\u6362\u4e3a\u5b57\u7b26\nprint(character)  # \u8f93\u51fa\uff1aA\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u5c06\u4e00\u4e2a\u5b57\u7b26\u8f6c\u4e3a\u4e8c\u8fdb\u5236\u7684\u4e3b\u8981\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u5185\u7f6e\u51fd\u6570bin()\u3001\u4f7f\u7528\u683c\u5f0f\u5316\u5b57\u7b26\u4e32\u3001\u624b\u52a8\u8f6c\u6362\u3002\u8fd9\u4e9b\u65b9 [&hellip;]","protected":false},"author":3,"featured_media":1147132,"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\/1147124"}],"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=1147124"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1147124\/revisions"}],"predecessor-version":[{"id":1147134,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1147124\/revisions\/1147134"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1147132"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1147124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1147124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1147124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}