{"id":1137925,"date":"2025-01-08T21:54:09","date_gmt":"2025-01-08T13:54:09","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1137925.html"},"modified":"2025-01-08T21:54:12","modified_gmt":"2025-01-08T13:54:12","slug":"python3%e5%a6%82%e4%bd%95%e5%b0%86%e5%ad%97%e7%ac%a6%e4%b8%b2%e5%8f%98%e4%b8%babytes","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1137925.html","title":{"rendered":"python3\u5982\u4f55\u5c06\u5b57\u7b26\u4e32\u53d8\u4e3abytes"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25101637\/85be0e2b-d8a0-4ff5-9015-74b1848acea3.webp\" alt=\"python3\u5982\u4f55\u5c06\u5b57\u7b26\u4e32\u53d8\u4e3abytes\" \/><\/p>\n<p><p> <strong>Python3\u5c06\u5b57\u7b26\u4e32\u53d8\u4e3abytes\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\uff1a\u4f7f\u7528encode\u65b9\u6cd5\u3001\u4f7f\u7528bytes\u51fd\u6570\u3001\u4f7f\u7528bytearray\u51fd\u6570\u3002<\/strong> \u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u548c\u5b57\u8282\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u7c7b\u578b\uff0c\u5b57\u7b26\u4e32\u7c7b\u578b\u662fstr\uff0c\u800c\u5b57\u8282\u7c7b\u578b\u662fbytes\u3002\u4e3a\u4e86\u5728\u5904\u7406\u4e0d\u540c\u7684\u7f16\u7801\u548c\u4f20\u8f93\u8fc7\u7a0b\u4e2d\uff0c\u6b63\u786e\u5730\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u975e\u5e38\u91cd\u8981\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528encode\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728Python3\u4e2d\uff0c\u6700\u5e38\u89c1\u548c\u63a8\u8350\u7684\u65b9\u5f0f\u662f\u4f7f\u7528\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684<code>encode<\/code>\u65b9\u6cd5\u3002\u8fd9\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u6309\u7167\u6307\u5b9a\u7684\u7f16\u7801\u683c\u5f0f\u8f6c\u6362\u4e3a\u5b57\u8282\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;Hello, World!&quot;<\/p>\n<p>bytes_data = string.encode(&#39;utf-8&#39;)<\/p>\n<p>print(bytes_data)  # \u8f93\u51fa\uff1ab&#39;Hello, World!&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>encode\u65b9\u6cd5\u7684\u4f18\u52bf\u5728\u4e8e\u53ef\u4ee5\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\uff0c\u5982&#39;utf-8&#39;\u3001&#39;ascii&#39;\u7b49\uff0c\u4f7f\u5f97\u8f6c\u6362\u66f4\u52a0\u7075\u6d3b\u548c\u9002\u5e94\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u3002<\/strong><\/p>\n<\/p>\n<p><h4>\u8be6\u7ec6\u63cf\u8ff0\uff1a<\/h4>\n<\/p>\n<p><p><code>encode<\/code> \u65b9\u6cd5\u662f\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u7279\u5b9a\u7f16\u7801\u683c\u5f0f\u7684\u5b57\u8282\u3002\u5e38\u89c1\u7684\u7f16\u7801\u683c\u5f0f\u5305\u62ec<code>utf-8<\/code>\u3001<code>ascii<\/code>\u3001<code>latin-1<\/code>\u7b49\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;\u4f60\u597d\uff0c\u4e16\u754c\uff01&quot;<\/p>\n<p>bytes_data = string.encode(&#39;utf-8&#39;)<\/p>\n<p>print(bytes_data)  # \u8f93\u51fa\uff1ab&#39;\\xe4\\xbd\\xa0\\xe5\\xa5\\xbd\\xef\\xbc\\x8c\\xe4\\xb8\\x96\\xe7\\x95\\x8c\\xef\\xbc\\x81&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5b57\u7b26\u4e32&quot;\u4f60\u597d\uff0c\u4e16\u754c\uff01&quot;\u88ab\u7f16\u7801\u4e3a<code>utf-8<\/code>\u683c\u5f0f\u7684\u5b57\u8282\u3002<code>utf-8<\/code>\u662f\u4e00\u79cd\u517c\u5bb9\u6027\u975e\u5e38\u597d\u7684\u7f16\u7801\u683c\u5f0f\uff0c\u53ef\u4ee5\u8868\u793a\u51e0\u4e4e\u6240\u6709\u7684\u5b57\u7b26\u96c6\uff0c\u56e0\u6b64\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u63a8\u8350\u4f7f\u7528<code>utf-8<\/code>\u7f16\u7801\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528bytes\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>bytes<\/code>\u51fd\u6570\u53ef\u4ee5\u76f4\u63a5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\uff0c\u4f46\u9700\u8981\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;Hello, World!&quot;<\/p>\n<p>bytes_data = bytes(string, &#39;utf-8&#39;)<\/p>\n<p>print(bytes_data)  # \u8f93\u51fa\uff1ab&#39;Hello, World!&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>bytes\u51fd\u6570\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u6d01\u7684\u65b9\u5f0f\u6765\u8fdb\u884c\u8f6c\u6362\uff0c\u7279\u522b\u662f\u5728\u9700\u8981\u76f4\u63a5\u751f\u6210bytes\u5bf9\u8c61\u65f6\u975e\u5e38\u65b9\u4fbf\u3002<\/strong><\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528bytearray\u51fd\u6570<\/h3>\n<\/p>\n<p><p><code>bytearray<\/code>\u51fd\u6570\u7c7b\u4f3c\u4e8e<code>bytes<\/code>\u51fd\u6570\uff0c\u4f46\u751f\u6210\u7684\u662f\u4e00\u4e2a\u53ef\u53d8\u7684\u5b57\u8282\u6570\u7ec4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;Hello, World!&quot;<\/p>\n<p>bytearray_data = bytearray(string, &#39;utf-8&#39;)<\/p>\n<p>print(bytearray_data)  # \u8f93\u51fa\uff1abytearray(b&#39;Hello, World!&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>bytearray\u51fd\u6570\u7684\u4f18\u52bf\u5728\u4e8e\u751f\u6210\u7684\u5b57\u8282\u6570\u7ec4\u662f\u53ef\u53d8\u7684\uff0c\u53ef\u4ee5\u8fdb\u884c\u4fee\u6539\u548c\u64cd\u4f5c\u3002<\/strong><\/p>\n<\/p>\n<p><h3>\u56db\u3001\u4e0d\u540c\u7f16\u7801\u683c\u5f0f\u7684\u9009\u62e9<\/h3>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u7f16\u7801\u683c\u5f0f\u5bf9\u4e8e\u6b63\u786e\u5730\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u975e\u5e38\u91cd\u8981\u3002<code>utf-8<\/code>\u662f\u4e00\u79cd\u901a\u7528\u4e14\u517c\u5bb9\u6027\u597d\u7684\u7f16\u7801\u683c\u5f0f\uff0c\u4f46\u5728\u67d0\u4e9b\u7279\u6b8a\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528\u5176\u4ed6\u7f16\u7801\u683c\u5f0f\u3002<\/p>\n<\/p>\n<p><h4>\u5e38\u89c1\u7f16\u7801\u683c\u5f0f\uff1a<\/h4>\n<\/p>\n<ol>\n<li><strong>UTF-8<\/strong>\uff1a\u51e0\u4e4e\u6240\u6709\u60c5\u51b5\u4e0b\u90fd\u9002\u7528\uff0c\u80fd\u8868\u793a\u51e0\u4e4e\u6240\u6709\u5b57\u7b26\u96c6\u3002<\/li>\n<li><strong>ASCII<\/strong>\uff1a\u9002\u7528\u4e8e\u7eaf\u82f1\u6587\u5b57\u7b26\uff0c\u4e0d\u652f\u6301\u7279\u6b8a\u5b57\u7b26\u3002<\/li>\n<li><strong>Latin-1<\/strong>\uff1a\u652f\u6301\u897f\u6b27\u8bed\u8a00\u7684\u7279\u6b8a\u5b57\u7b26\u3002<\/li>\n<\/ol>\n<p><h3>\u4e94\u3001\u5904\u7406\u7f16\u7801\u9519\u8bef<\/h3>\n<\/p>\n<p><p>\u5728\u8f6c\u6362\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u7f16\u7801\u9519\u8bef\u3002\u4f8b\u5982\uff0c\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u65e0\u6cd5\u5728\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\u4e2d\u8868\u793a\u7684\u5b57\u7b26\u3002\u6b64\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u9519\u8bef\u5904\u7406\u65b9\u5f0f\u6765\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;Hello, \u4e16\u754c!&quot;<\/p>\n<p>try:<\/p>\n<p>    bytes_data = string.encode(&#39;ascii&#39;, &#39;strict&#39;)<\/p>\n<p>except UnicodeEncodeError as e:<\/p>\n<p>    print(f&quot;\u7f16\u7801\u9519\u8bef: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u5b57\u7b26\u4e32&quot;Hello, \u4e16\u754c!&quot;\u5305\u542b\u4e86\u975eASCII\u5b57\u7b26\uff0c\u5728\u4f7f\u7528<code>ascii<\/code>\u7f16\u7801\u65f6\u4f1a\u629b\u51fa<code>UnicodeEncodeError<\/code>\u3002\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u9519\u8bef\u5904\u7406\u65b9\u5f0f\uff0c\u5982<code>ignore<\/code>\uff08\u5ffd\u7565\u9519\u8bef\uff09\u6216<code>replace<\/code>\uff08\u66ff\u6362\u4e3a\u95ee\u53f7\uff09\uff0c\u6765\u907f\u514d\u7a0b\u5e8f\u5d29\u6e83\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">bytes_data_ignore = string.encode(&#39;ascii&#39;, &#39;ignore&#39;)<\/p>\n<p>print(bytes_data_ignore)  # \u8f93\u51fa\uff1ab&#39;Hello, !&#39;<\/p>\n<p>bytes_data_replace = string.encode(&#39;ascii&#39;, &#39;replace&#39;)<\/p>\n<p>print(bytes_data_replace)  # \u8f93\u51fa\uff1ab&#39;Hello, ???&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u4ece\u6587\u4ef6\u4e2d\u8bfb\u53d6\u5b57\u7b26\u4e32\u5e76\u8f6c\u6362\u4e3a\u5b57\u8282<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5b57\u7b26\u4e32\u5e38\u5e38\u6765\u81ea\u6587\u4ef6\u3002\u53ef\u4ee5\u901a\u8fc7\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u5e76\u8fdb\u884c\u7f16\u7801\u8f6c\u6362\u6765\u5b9e\u73b0\u5b57\u7b26\u4e32\u5230\u5b57\u8282\u7684\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;, encoding=&#39;utf-8&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p>    bytes_data = content.encode(&#39;utf-8&#39;)<\/p>\n<p>    print(bytes_data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u5c06\u5b57\u8282\u8f6c\u6362\u56de\u5b57\u7b26\u4e32<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u9700\u8981\u5c06\u5b57\u8282\u8f6c\u6362\u56de\u5b57\u7b26\u4e32\u3002\u53ef\u4ee5\u4f7f\u7528<code>decode<\/code>\u65b9\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">bytes_data = b&#39;Hello, World!&#39;<\/p>\n<p>string = bytes_data.decode(&#39;utf-8&#39;)<\/p>\n<p>print(string)  # \u8f93\u51fa\uff1aHello, World!<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516b\u3001\u5e38\u89c1\u95ee\u9898\u548c\u89e3\u51b3\u65b9\u6848<\/h3>\n<\/p>\n<p><h4>1. UnicodeEncodeError<\/h4>\n<\/p>\n<p><p>\u5f53\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u65e0\u6cd5\u8868\u793a\u7684\u5b57\u7b26\u65f6\uff0c\u4f1a\u629b\u51fa<code>UnicodeEncodeError<\/code>\u3002\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u9519\u8bef\u5904\u7406\u65b9\u5f0f\u6765\u89e3\u51b3\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">string = &quot;Hello, \u4e16\u754c!&quot;<\/p>\n<p>bytes_data = string.encode(&#39;ascii&#39;, &#39;ignore&#39;)<\/p>\n<p>print(bytes_data)  # \u8f93\u51fa\uff1ab&#39;Hello, !&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. TypeError<\/h4>\n<\/p>\n<p><p>\u5f53\u5c1d\u8bd5\u5c06\u975e\u5b57\u7b26\u4e32\u5bf9\u8c61\u8f6c\u6362\u4e3a\u5b57\u8282\u65f6\uff0c\u4f1a\u629b\u51fa<code>TypeError<\/code>\u3002\u786e\u4fdd\u8f93\u5165\u5bf9\u8c61\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">not_string = 12345<\/p>\n<p>try:<\/p>\n<p>    bytes_data = not_string.encode(&#39;utf-8&#39;)<\/p>\n<p>except AttributeError as e:<\/p>\n<p>    print(f&quot;\u7c7b\u578b\u9519\u8bef: {e}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u5728Python3\u4e2d\u662f\u4e00\u4e2a\u5e38\u89c1\u4e14\u91cd\u8981\u7684\u64cd\u4f5c\u3002\u901a\u8fc7\u4f7f\u7528<code>encode<\/code>\u65b9\u6cd5\u3001<code>bytes<\/code>\u51fd\u6570\u548c<code>bytearray<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u5b9e\u73b0\u8fd9\u4e00\u8f6c\u6362\u3002\u9009\u62e9\u5408\u9002\u7684\u7f16\u7801\u683c\u5f0f\u548c\u9519\u8bef\u5904\u7406\u65b9\u5f0f\uff0c\u53ef\u4ee5\u786e\u4fdd\u8f6c\u6362\u8fc7\u7a0b\u7684\u6b63\u786e\u6027\u548c\u9c81\u68d2\u6027\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5904\u7406\u6765\u81ea\u6587\u4ef6\u7684\u5b57\u7b26\u4e32\u548c\u5c06\u5b57\u8282\u8f6c\u6362\u56de\u5b57\u7b26\u4e32\u4e5f\u662f\u5e38\u89c1\u7684\u9700\u6c42\u3002\u5e0c\u671b\u901a\u8fc7\u8fd9\u7bc7\u6587\u7ae0\u7684\u4ecb\u7ecd\uff0c\u8bfb\u8005\u80fd\u591f\u5168\u9762\u7406\u89e3\u548c\u638c\u63e1Python3\u4e2d\u5b57\u7b26\u4e32\u5230\u5b57\u8282\u7684\u8f6c\u6362\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python3\u4e2d\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\uff1f<\/strong><br \/>\u5728Python3\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>encode()<\/code>\u65b9\u6cd5\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u5b57\u7b26\u7f16\u7801\uff0c\u4f8b\u5982<code>utf-8<\/code>\uff0c\u6765\u786e\u4fdd\u5b57\u7b26\u4e32\u6b63\u786e\u5730\u8f6c\u6362\u4e3a\u5b57\u8282\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>my_string.encode(&#39;utf-8&#39;)<\/code>\u5c06<code>my_string<\/code>\u8f6c\u6362\u4e3a\u5b57\u8282\u5bf9\u8c61\u3002<\/p>\n<p><strong>\u4f7f\u7528\u4ec0\u4e48\u7f16\u7801\u65b9\u5f0f\u8fdb\u884c\u5b57\u7b26\u4e32\u5230\u5b57\u8282\u7684\u8f6c\u6362\u6bd4\u8f83\u597d\uff1f<\/strong><br \/><code>utf-8<\/code>\u7f16\u7801\u901a\u5e38\u662f\u4e00\u4e2a\u7406\u60f3\u7684\u9009\u62e9\uff0c\u56e0\u4e3a\u5b83\u517c\u5bb9ASCII\u5e76\u652f\u6301\u591a\u79cd\u5b57\u7b26\u3002\u5bf9\u4e8e\u5927\u591a\u6570\u5e94\u7528\u573a\u666f\uff0c\u4f7f\u7528<code>utf-8<\/code>\u80fd\u591f\u786e\u4fdd\u66f4\u5e7f\u6cdb\u7684\u5b57\u7b26\u96c6\u652f\u6301\u3002\u5982\u679c\u4f60\u77e5\u9053\u5b57\u7b26\u4e32\u53ea\u5305\u542bASCII\u5b57\u7b26\uff0c\u4f7f\u7528<code>ascii<\/code>\u7f16\u7801\u4e5f\u662f\u53ef\u884c\u7684\u3002<\/p>\n<p><strong>\u5728\u8f6c\u6362\u8fc7\u7a0b\u4e2d\u4f1a\u9047\u5230\u4ec0\u4e48\u5e38\u89c1\u9519\u8bef\uff1f<\/strong><br \/>\u5728\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u65f6\uff0c\u6700\u5e38\u89c1\u7684\u9519\u8bef\u4e4b\u4e00\u662f\u9009\u62e9\u4e86\u4e0d\u652f\u6301\u7684\u5b57\u7b26\u7f16\u7801\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\u67d0\u4e9b\u7279\u5b9a\u5b57\u7b26\u800c\u4f60\u9009\u62e9\u4e86<code>ascii<\/code>\u7f16\u7801\uff0c\u53ef\u80fd\u4f1a\u5f15\u53d1<code>UnicodeEncodeError<\/code>\u3002\u786e\u4fdd\u9009\u62e9\u9002\u5408\u7684\u7f16\u7801\u65b9\u5f0f\u53ef\u4ee5\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python3\u5c06\u5b57\u7b26\u4e32\u53d8\u4e3abytes\u7684\u65b9\u6cd5\u4e3b\u8981\u6709\uff1a\u4f7f\u7528encode\u65b9\u6cd5\u3001\u4f7f\u7528bytes\u51fd\u6570\u3001\u4f7f\u7528bytearr [&hellip;]","protected":false},"author":3,"featured_media":1137930,"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\/1137925"}],"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=1137925"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1137925\/revisions"}],"predecessor-version":[{"id":1137933,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1137925\/revisions\/1137933"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1137930"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1137925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1137925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1137925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}