{"id":114297,"date":"2026-10-08T22:09:12","date_gmt":"2026-10-08T14:09:12","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/114297.html"},"modified":"2026-10-08T22:09:12","modified_gmt":"2026-10-08T14:09:12","slug":"%e6%97%a5%e5%bf%97%e9%87%8c%e5%85%a8%e6%98%af-uxxxx%ef%bc%9fjson-dumps-%e5%9b%9b%e4%b8%aa%e9%bb%98%e8%ae%a4%e5%8f%82%e6%95%b0%e7%9a%84%e5%ae%9e%e6%b5%8b%e8%b4%a6%e5%8d%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/114297.html","title":{"rendered":"\u65e5\u5fd7\u91cc\u5168\u662f \\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261008140906-6ac7a40280b14.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8fd9\u5468\u8fde\u7eed\u649e\u4e0a\u4e24\u6869\u602a\u4e8b&#xff1a;\u5148\u662f\u4e3a\u53cc\u5feb\u7167\u505a\u5185\u5bb9\u6307\u7eb9&#xff0c;\u4e24\u4efd\u4e00\u6a21\u4e00\u6837\u7684\u6570\u636e\u54c8\u5e0c\u6b7b\u6d3b\u5bf9\u4e0d\u4e0a&#xff1b;\u540e\u6765\u53c8\u53d1\u73b0\u7d27\u51d1\u5e8f\u5217\u5316\u80fd\u7701\u4e0b\u5341\u51e0\u4e2a\u5b57\u8282&#xff0c;\u800c\u540c\u4e8b\u7684\u4ee3\u7801\u91cc\u600e\u4e48\u6539\u90fd\u7701\u4e0d\u51fa\u6765\u3002\u8ffd\u5230\u5e95&#xff0c;\u4e24\u6869\u90fd\u662f\u540c\u4e00\u4e2a\u6e90\u5934\u2014\u2014json.dumps \u7684\u9ed8\u8ba4\u53c2\u6570\u3002\u5b83\u6709\u56db\u4e2a\u9ed8\u8ba4\u503c&#xff0c;\u6bcf\u4e00\u4e2a\u90fd\u66fe\u5728\u771f\u5b9e\u6570\u636e\u4e0a\u54ac\u8fc7\u4eba\u3002\u8fd9\u7bc7\u628a\u5b83\u4eec\u9010\u4e00\u5b9e\u6d4b&#xff08;Python 3.13.12&#xff09;&#xff0c;\u8d26\u5355\u5982\u4e0b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261008140908-6ac7a40457003.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u4e00\u3001ensure_ascii&#xff1a;\u4e2d\u6587\u5b57\u8282\u7684 46% \u7a0e<\/li>\n<li>\u4e8c\u3001sort_keys&#xff1a;\u6307\u7eb9\u5bf9\u4e0d\u9f50\u7684\u771f\u51f6<\/li>\n<li>\u4e09\u3001separators&#xff1a;\u9ed8\u8ba4\u503c\u91cc\u85cf\u7740\u4e24\u4e2a\u7a7a\u683c<\/li>\n<li>\u56db\u3001allow_nan&#xff1a;\u4e00\u4e2a\u4e0d\u7b97 JSON \u7684\u5408\u6cd5\u8f93\u51fa<\/li>\n<li>\u4e94\u3001round-trip \u4e0d\u662f\u6052\u7b49<\/li>\n<li>\u516d\u3001\u7ed9\u6307\u7eb9\u573a\u666f\u7acb\u4e00\u6761\u94c1\u5f8b<\/li>\n<li>\u4e03\u300130 \u79d2\u5e26\u8d70\u7248<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u4e00\u3001ensure_ascii&#xff1a;\u4e2d\u6587\u5b57\u8282\u7684 46% \u7a0e<\/h3>\n<p>\u9ed8\u8ba4 ensure_ascii&#061;True \u4f1a\u628a\u6240\u6709\u975e ASCII \u5b57\u7b26\u8f6c\u6210\u53cd\u659c\u6760 u \u5f00\u5934\u7684\u8f6c\u4e49\u5e8f\u5217\u3002\u5b9e\u6d4b\u5bf9\u8c61\u662f\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u4e24\u952e\u5b57\u5178&#xff1a;\u952e\u4e3a\u57ce\u5e02\u3001\u503c\u4e3a\u9999\u6e2f&#xff0c;\u518d\u52a0\u4e00\u4e2a\u4eba\u6570\u8ba1\u6570\u3002\u9ed8\u8ba4\u5199\u6cd5\u5e8f\u5217\u5316\u51fa\u6765 57 \u5b57\u8282&#xff0c;\u5173\u6389\u8f6c\u4e49\u540e 39 \u5b57\u8282\u2014\u2014\u540c\u6837\u7684\u6570\u636e&#xff0c;\u591a\u4ed8 46%\u3002\u8d26\u76ee\u5f88\u6e05\u695a&#xff1a;\u5b57\u5178\u91cc\u7684 6 \u4e2a\u6c49\u5b57\u6309 UTF-8 \u672c\u662f\u6bcf\u4e2a 3 \u5b57\u8282&#xff0c;\u8f6c\u4e49\u540e\u53d8\u6210\u6bcf\u4e2a 6 \u4e2a ASCII \u5b57\u7b26&#xff0c;\u5149\u8fd9\u4e00\u9879\u5c31\u51c0\u591a 18 \u5b57\u8282\u3002<\/p>\n<p>\u8fd9\u4e0d\u53ea\u662f\u96be\u770b&#xff1a;\u8f6c\u4e49\u540e\u7684\u4e32\u5728\u65e5\u5fd7\u91cc\u4e0d\u53ef\u8bfb&#xff08;\u6392\u67e5\u65f6\u8981\u4eba\u8089\u53cd\u89e3&#xff09;\u3001\u5b57\u8282\u7edf\u8ba1\u7ffb\u500d\u3001\u4e0e\u524d\u7aef\u6838\u5bf9\u5b57\u6bb5\u65f6\u957f\u5ea6\u5bf9\u4e0d\u4e0a\u3002\u5bf9\u5916\u63a5\u53e3\u5efa\u8bae\u4fdd\u6301\u9ed8\u8ba4&#xff08;\u6700\u5927\u517c\u5bb9\u8001\u5ba2\u6237\u7aef&#xff09;&#xff0c;\u65e5\u5fd7\u4e0e\u672c\u5730\u6587\u4ef6\u5efa\u8bae\u5173\u6389\u2014\u2014ensure_ascii&#061;False \u52a0\u4e0a\u6587\u4ef6\u5199\u5165\u65f6\u663e\u5f0f\u6307\u5b9a utf-8 \u7f16\u7801&#xff0c;\u4e24\u4ef6\u4e8b\u7f3a\u4e00\u4e0d\u53ef&#xff0c;\u6f0f\u4e86\u540e\u8005\u4f1a\u76f4\u63a5\u629b\u7f16\u7801\u5f02\u5e38\u3002<\/p>\n<h3>\u4e8c\u3001sort_keys&#xff1a;\u6307\u7eb9\u5bf9\u4e0d\u9f50\u7684\u771f\u51f6<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261008140908-6ac7a40496ce3.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u66f4\u9690\u853d\u7684\u4e00\u4e2a&#xff1a;dict \u7684\u5e8f\u5217\u5316\u987a\u5e8f\u7b49\u4e8e\u63d2\u5165\u987a\u5e8f\u3002\u540c\u4e00\u4e2a\u5185\u5bb9\u3001\u4e24\u79cd\u6784\u5efa\u987a\u5e8f&#xff0c;\u4ea7\u51fa\u7684\u5b57\u8282\u4e32\u4e0d\u540c&#xff0c;sha1 \u6307\u7eb9\u5b9e\u6d4b\u5206\u522b\u4e3a b6ebf63d155d \u4e0e bfb36f31854e\u2014\u2014\u503c\u76f8\u7b49&#xff0c;\u6307\u7eb9\u4e0d\u540c\u3002\u6211\u4e0a\u5468\u7684\u53cc\u5feb\u7167\u6821\u9a8c\u5c31\u662f\u8fd9\u6837\u8bef\u62a5\u7684&#xff1a;\u540c\u4e00\u63a5\u53e3\u4e24\u6b21\u6293\u53d6&#xff0c;\u5bf9\u7aef\u5728\u4e24\u6b21\u54cd\u5e94\u4e4b\u95f4\u8c03\u6574\u4e86\u5b57\u6bb5\u987a\u5e8f&#xff0c;\u6211\u7684\u6307\u7eb9\u5374\u62ff\u5b83\u4eec\u5f53\u4e24\u4efd\u6570\u636e\u3002<\/p>\n<p>\u4fee\u6cd5\u4e00\u884c&#xff1a;\u5e8f\u5217\u5316\u65f6\u52a0 sort_keys&#061;True\u2014\u2014\u5b9e\u6d4b\u52a0\u6392\u5e8f\u540e\u4e24\u6b21\u54c8\u5e0c\u7cbe\u786e\u4e00\u81f4\u3002\u51e1\u662f\u7528\u5e8f\u5217\u5316\u7ed3\u679c\u505a\u6307\u7eb9\u3001\u54c8\u5e0c\u3001\u53bb\u91cd\u7684\u573a\u666f&#xff0c;\u8fd9\u4e2a\u53c2\u6570\u4e0d\u662f\u53ef\u9009\u9879\u3002\u5b83\u89e3\u51b3\u4e0d\u4e86\u5d4c\u5957\u5217\u8868\u5185\u90e8\u7684\u987a\u5e8f\u5dee\u5f02&#xff08;\u90a3\u662f\u6570\u636e\u672c\u8eab\u7684\u95ee\u9898&#xff09;&#xff0c;\u4f46\u80fd\u628a\u300c\u952e\u5e8f\u300d\u8fd9\u4e00\u6574\u7c7b\u8bef\u62a5\u6e05\u96f6\u3002<\/p>\n<h3>\u4e09\u3001separators&#xff1a;\u9ed8\u8ba4\u503c\u91cc\u85cf\u7740\u4e24\u4e2a\u7a7a\u683c<\/h3>\n<p>\u9ed8\u8ba4\u5206\u9694\u7b26\u5728\u9017\u53f7\u548c\u5192\u53f7\u540e\u9762\u5404\u8ddf\u4e00\u4e2a\u7a7a\u683c\u3002\u5b9e\u6d4b\u4e00\u4e2a\u56db\u952e\u5c0f\u5b57\u5178&#xff1a;\u9ed8\u8ba4 28 \u5b57\u8282&#xff0c;\u7d27\u51d1\u5199\u6cd5 23 \u5b57\u8282\u3002\u793a\u4f8b\u8d8a\u5c0f\u5dee\u8ddd\u8d8a\u4e0d\u8d77\u773c&#xff0c;\u4f46\u5b83\u662f\u6309\u952e\u503c\u5bf9\u56fa\u5b9a\u5f81\u6536\u7684&#xff1a;\u4e0a\u4e07\u6761\u8bb0\u5f55\u7684\u5bfc\u51fa\u6587\u4ef6\u91cc&#xff0c;\u8fd9\u5c31\u662f\u7a33\u7a33\u7684\u4e00\u6210\u4f53\u79ef\u3002\u914d\u5408\u5173\u95ed ascii \u8f6c\u4e49&#xff0c;\u5bfc\u51fa\u7c7b\u4efb\u52a1\u7684\u4f53\u79ef\u80fd\u7701\u4e0b\u4e24\u6210\u4ee5\u4e0a\u3002\u53cd\u8fc7\u6765\u4e5f\u8981\u63d0\u9192&#xff1a;\u5bf9\u5916\u63a5\u53e3\u4e0d\u8981\u4e3a\u7701\u5b57\u8282\u6539\u5206\u9694\u7b26\u2014\u2014\u7d27\u51d1\u4e0e\u5426\u662f\u5408\u6cd5\u7684 JSON \u4e24\u9762&#xff0c;\u4f46\u5bf9\u63a5\u65b9\u7684\u5b57\u8282\u6570\u6821\u9a8c\u3001\u7b7e\u540d\u8ba1\u7b97\u82e5\u57fa\u4e8e\u9ed8\u8ba4\u683c\u5f0f&#xff0c;\u6539\u52a8\u4f1a\u7834\u574f\u5bf9\u8d26\u3002<\/p>\n<h3>\u56db\u3001allow_nan&#xff1a;\u4e00\u4e2a\u4e0d\u7b97 JSON \u7684\u5408\u6cd5\u8f93\u51fa<\/h3>\n<p>\u6700\u610f\u5916\u7684\u4e00\u4e2a\u3002\u9ed8\u8ba4 allow_nan&#061;True \u4e0b&#xff0c;\u542b\u6b63\u8d1f\u65e0\u7a77\u4e0e\u975e\u6570\u7684\u5b57\u5178\u7167\u6837\u80fd\u5e8f\u5217\u5316&#xff0c;\u8f93\u51fa\u91cc\u51fa\u73b0 NaN\u3001Infinity \u8fd9\u6837\u7684\u5b57\u9762\u91cf\u2014\u2014\u800c JSON \u89c4\u8303&#xff08;RFC 8259&#xff09;\u91cc\u6839\u672c\u6ca1\u6709\u8fd9\u4e9b\u5b57\u9762\u91cf&#xff0c;\u4e25\u683c\u89e3\u6790\u5668&#xff08;\u5305\u62ec\u6d4f\u89c8\u5668\u91cc\u7684 JSON.parse&#xff09;\u62ff\u5230\u5c31\u4f1a\u629b\u9519\u3002\u5b9e\u6d4b\u66f4\u8ff7\u60d1\u7684\u662f&#xff1a;\u6807\u51c6\u5e93\u81ea\u5df1\u7684\u89e3\u6790\u5668\u5c45\u7136\u80fd\u628a NaN \u539f\u6837\u8bfb\u56de\u2014\u2014\u8fd9\u662f CPython \u81ea\u7559\u7684\u975e\u6807\u51c6\u540e\u95e8&#xff0c;\u4e3a\u7684\u662f\u81ea\u5bb6 round-trip \u65e0\u635f\u3002<\/p>\n<p>\u6362\u53e5\u8bdd\u8bf4&#xff1a;Python \u5199\u51fa\u7684\u300cJSON\u300d&#xff0c;Python \u81ea\u5df1\u8bfb\u5f97\u61c2&#xff0c;\u5168\u4e16\u754c\u90fd\u8bfb\u4e0d\u61c2\u3002\u5b9e\u6d4b\u8fd9\u4e2a\u540e\u95e8\u662f\u53cc\u5411\u7684\u2014\u2014\u5199\u8fdb\u53bb\u7684 NaN \u80fd\u539f\u6837\u8bfb\u56de&#xff0c;\u4f46\u8fd9\u53ea\u5728\u672c\u8bed\u8a00\u5185\u6210\u7acb&#xff1b;\u4efb\u4f55\u8de8\u8bed\u8a00\u7684\u94fe\u8def&#xff08;\u6d4f\u89c8\u5668\u3001\u79fb\u52a8\u7aef\u3001\u4e25\u683c\u89e3\u6790\u5668&#xff09;\u90fd\u4f1a\u5728\u540c\u4e00\u4e2a\u5b57\u9762\u91cf\u4e0a\u65ad\u6389&#xff0c;\u800c\u4e14\u62a5\u9519\u7684\u4eba\u770b\u5230\u7684\u662f\u4e00\u4efd\u300c\u770b\u8d77\u6765\u5b8c\u5168\u6b63\u5e38\u300d\u7684\u8f93\u51fa\u3002\u5e26\u975e\u6570\u7684\u5b9e\u6d4b\u91cf\u8981\u51fa\u7f51&#xff0c;\u5148\u5728\u5e8f\u5217\u5316\u524d\u6e05\u6d17\u6210\u7a7a\u503c\u6216\u663e\u5f0f\u6807\u8bb0\u5b57\u7b26\u4e32&#xff1b;\u6307\u671b\u9ed8\u8ba4\u53c2\u6570\u66ff\u4f60\u628a\u5173&#xff0c;\u5b83\u53ea\u4f1a\u6c89\u9ed8\u5730\u653e\u884c\u3002<\/p>\n<h3>\u4e94\u3001round-trip \u4e0d\u662f\u6052\u7b49<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261008140908-6ac7a404da54c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u628a\u56db\u6761\u9759\u9ed8\u53d8\u5f62\u653e\u5728\u4e00\u8d77\u770b&#xff1a;\u5143\u7ec4\u8fc7\u4e00\u8d9f\u53d8\u5217\u8868&#xff1b;\u6574\u6570\u952e\u53d8\u5b57\u7b26\u4e32\u952e&#xff08;\u53d6\u503c\u65b9\u5f0f\u5f97\u8ddf\u7740\u6539&#xff09;&#xff1b;datetime \u5bf9\u8c61\u8981\u4e48\u5148\u8f6c\u5b57\u7b26\u4e32\u3001\u8981\u4e48\u76f4\u63a5\u629b\u9519\u2014\u2014\u800c\u5b57\u7b26\u4e32\u5316\u4f1a\u628a\u65f6\u533a\u6807\u7b7e\u5265\u6389&#xff0c;\u8fd9\u6b63\u662f\u6628\u5929\u90a3\u7bc7 utcnow \u6f02\u79fb\u7684\u4e0b\u6e38\u4e8b\u6545\u3002\u8bfb\u56de\u7b49\u4e8e\u5199\u51fa&#xff0c;\u53ea\u5bf9 JSON \u539f\u751f\u7c7b\u578b\u6210\u7acb&#xff1b;\u8de8\u8fc7\u53bb\u4e00\u8d9f&#xff0c;\u5f62\u72b6\u3001\u952e\u578b\u3001\u6807\u7b7e\u90fd\u53ef\u80fd\u6084\u6084\u6362\u6389\u3002\u4efb\u4f55\u4f9d\u8d56 round-trip \u4fdd\u771f\u7684\u4ee3\u7801&#xff0c;\u90fd\u8be5\u6709\u7c7b\u578b\u65ad\u8a00\u515c\u5e95\u3002<\/p>\n<h3>\u516d\u3001\u7ed9\u6307\u7eb9\u573a\u666f\u7acb\u4e00\u6761\u94c1\u5f8b<\/h3>\n<p>\u7efc\u5408\u8fd9\u4e00\u5468\u7684\u4e24\u6b21\u4e8b\u6545&#xff0c;\u7ed9\u6240\u6709\u300c\u7528\u5e8f\u5217\u5316\u7ed3\u679c\u505a\u6bd4\u5bf9\u300d\u7684\u573a\u666f\u7acb\u4e00\u6761\u4e09\u4ef6\u5957\u94c1\u5f8b&#xff1a;\u6392\u5e8f&#xff08;sort_keys&#061;True&#xff09;&#043; \u5173\u8f6c\u4e49&#xff08;ensure_ascii&#061;False&#xff09;&#043; \u7d27\u51d1\u5206\u9694\u7b26&#xff0c;\u4e09\u4e2a\u53c2\u6570\u540c\u65f6\u56fa\u5b9a&#xff0c;\u6307\u7eb9\u624d\u6709\u53ef\u6bd4\u6027\u2014\u2014\u53ea\u56fa\u5b9a\u5176\u4e2d\u4e00\u4e2a&#xff0c;\u53e6\u5916\u4e24\u4e2a\u9ed8\u8ba4\u503c\u968f\u65f6\u4f1a\u628a\u6bd4\u5bf9\u7ed3\u679c\u6405\u6d51\u3002\u987a\u5e26\u4e00\u63d0&#xff0c;\u63a2\u8868\u5f0f\u8c03\u8bd5\u65f6\u5148\u6253\u5370\u5e8f\u5217\u5316\u7ed3\u679c\u7684\u524d 60 \u4e2a\u5b57\u7b26\u518d\u7b97\u54c8\u5e0c&#xff1a;\u8f6c\u4e49\u7b26\u3001\u7a7a\u683c\u3001\u952e\u5e8f\u8fd9\u4e09\u7c7b\u95ee\u9898&#xff0c;\u8089\u773c\u4e00\u773c\u53ef\u89c1&#xff0c;\u54c8\u5e0c\u53ea\u4f1a\u544a\u8bc9\u4f60\u300c\u4e0d\u76f8\u7b49\u300d\u3002<\/p>\n<h3>\u4e03\u300130 \u79d2\u5e26\u8d70\u7248<\/h3>\n<li>ensure_ascii&#061;True \u9ed8\u8ba4\u8f6c\u4e49\u4e2d\u6587&#xff1a;\u5b9e\u6d4b\u591a 46% \u5b57\u8282&#xff0c;\u65e5\u5fd7\u4e0d\u53ef\u8bfb\u2014\u2014\u672c\u5730\u6587\u4ef6\u4e0e\u65e5\u5fd7\u5173\u6389\u5b83&#xff0c;\u6587\u4ef6\u5199\u5165\u540c\u65f6\u6307\u5b9a utf-8&#xff1b;<\/li>\n<li>\u6307\u7eb9\u3001\u54c8\u5e0c\u3001\u53bb\u91cd\u5fc5\u987b sort_keys&#061;True&#xff1a;\u63d2\u5165\u987a\u5e8f\u5c31\u662f\u5e8f\u5217\u5316\u987a\u5e8f&#xff0c;\u5b9e\u6d4b\u4e24\u6b21 sha1 \u56e0\u6b64\u5206\u53c9&#xff1b;<\/li>\n<li>\u9ed8\u8ba4\u5206\u9694\u7b26\u5e26\u7a7a\u683c&#xff0c;\u7d27\u51d1\u5199\u6cd5\u5bf9\u5bfc\u51fa\u4efb\u52a1\u56fa\u5b9a\u7701\u4e00\u6210\u4f53\u79ef&#xff0c;\u4f46\u5bf9\u5916\u63a5\u53e3\u522b\u52a8&#xff1b;<\/li>\n<li>\u9ed8\u8ba4\u653e\u884c NaN&#xff1a;\u4e0d\u5408 JSON \u89c4\u8303\u3001\u8de8\u8bed\u8a00\u5fc5\u70b8&#xff0c;\u51fa\u7f51\u524d\u6e05\u6d17\u6210\u7a7a\u503c&#xff1b;<\/li>\n<li>round-trip \u6709\u56db\u5904\u9759\u9ed8\u53d8\u5f62&#xff08;\u5143\u7ec4\u3001\u6574\u6570\u952e\u3001\u975e\u6570\u3001datetime&#xff09;&#xff0c;\u4fdd\u771f\u4f9d\u8d56\u8981\u52a0\u7c7b\u578b\u65ad\u8a00\u3002<\/li>\n<p>\u53c2\u8003\u94fe\u63a5<\/p>\n<li>https:\/\/docs.python.org\/3\/library\/json.html<\/li>\n<li>https:\/\/www.rfc-editor.org\/rfc\/rfc8259<\/li>\n<p>\u672c\u6587\u5b9e\u9a8c\u73af\u5883&#xff1a;Python 3.13.12 \u6807\u51c6\u5e93&#xff1b;\u5b57\u8282\u6570\u4e0e\u54c8\u5e0c\u503c\u5747\u4e3a\u672c\u673a\u5b9e\u6d4b&#xff0c;\u54c8\u5e0c\u793a\u4f8b\u503c\u968f\u5185\u5bb9\u4e0d\u540c\u800c\u4e0d\u540c&#xff0c;\u65b9\u6cd5\u53ef\u76f4\u63a5\u590d\u73b0\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261008140909-6ac7a4054d393.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u5468\u8fde\u7eed\u649e\u4e0a\u4e24\u6869\u602a\u4e8b&#xff1a;\u5148\u662f\u4e3a\u53cc\u5feb\u7167\u505a\u5185\u5bb9\u6307\u7eb9&#xff0c;\u4e24\u4efd\u4e00\u6a21\u4e00\u6837\u7684\u6570\u636e\u54c8\u5e0c\u6b7b\u6d3b\u5bf9\u4e0d\u4e0a&#xff1b;\u540e\u6765\u53c8\u53d1\u73b0\u7d27\u51d1\u5e8f\u5217\u5316\u80fd\u7701\u4e0b\u5341\u51e0\u4e2a\u5b57\u8282&#xff0c;\u800c\u540c\u4e8b\u7684\u4ee3\u7801\u91cc\u600e\u4e48\u6539\u90fd\u7701\u4e0d\u51fa\u6765\u3002\u8ffd\u5230\u5e95&#xff0c;\u4e24\u6869\u90fd\u662f\u540c\u4e00\u4e2a\u6e90\u5934\u2014\u2014json.dumps \u7684\u9ed8\u8ba4\u53c2\u6570\u3002\u5b83\u6709\u56db\u4e2a\u9ed8\u8ba4\u503c&#xff0c;\u6bcf\u4e00\u4e2a\u90fd\u66fe\u5728\u771f\u5b9e\u6570\u636e\u4e0a\u54ac\u8fc7\u4eba\u3002\u8fd9\u7bc7\u628a\u5b83\u4eec\u9010\u4e00\u5b9e\u6d4b&#xff08;Python 3.13.12&#xff09;&#xff0c;\u8d26\u5355\u5982\u4e0b\u3002 \u6587\u7ae0\u76ee\u5f55\u4e00\u3001ensure_as<\/p>\n","protected":false},"author":2,"featured_media":114292,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9098,12415,11057,12806,93,81],"topic":[],"class_list":["post-114297","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-it","tag-12415","tag-11057","tag-12806","tag-json","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u65e5\u5fd7\u91cc\u5168\u662f \\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/114297.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u65e5\u5fd7\u91cc\u5168\u662f \\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u5468\u8fde\u7eed\u649e\u4e0a\u4e24\u6869\u602a\u4e8b&#xff1a;\u5148\u662f\u4e3a\u53cc\u5feb\u7167\u505a\u5185\u5bb9\u6307\u7eb9&#xff0c;\u4e24\u4efd\u4e00\u6a21\u4e00\u6837\u7684\u6570\u636e\u54c8\u5e0c\u6b7b\u6d3b\u5bf9\u4e0d\u4e0a&#xff1b;\u540e\u6765\u53c8\u53d1\u73b0\u7d27\u51d1\u5e8f\u5217\u5316\u80fd\u7701\u4e0b\u5341\u51e0\u4e2a\u5b57\u8282&#xff0c;\u800c\u540c\u4e8b\u7684\u4ee3\u7801\u91cc\u600e\u4e48\u6539\u90fd\u7701\u4e0d\u51fa\u6765\u3002\u8ffd\u5230\u5e95&#xff0c;\u4e24\u6869\u90fd\u662f\u540c\u4e00\u4e2a\u6e90\u5934\u2014\u2014json.dumps \u7684\u9ed8\u8ba4\u53c2\u6570\u3002\u5b83\u6709\u56db\u4e2a\u9ed8\u8ba4\u503c&#xff0c;\u6bcf\u4e00\u4e2a\u90fd\u66fe\u5728\u771f\u5b9e\u6570\u636e\u4e0a\u54ac\u8fc7\u4eba\u3002\u8fd9\u7bc7\u628a\u5b83\u4eec\u9010\u4e00\u5b9e\u6d4b&#xff08;Python 3.13.12&#xff09;&#xff0c;\u8d26\u5355\u5982\u4e0b\u3002 \u6587\u7ae0\u76ee\u5f55\u4e00\u3001ensure_as\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/114297.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-08T14:09:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261008140906-6ac7a40280b14.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/114297.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/114297.html\",\"name\":\"\u65e5\u5fd7\u91cc\u5168\u662f \\\\\\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-08T14:09:12+00:00\",\"dateModified\":\"2026-10-08T14:09:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/114297.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/114297.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/114297.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u65e5\u5fd7\u91cc\u5168\u662f \\\\\\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u65e5\u5fd7\u91cc\u5168\u662f \\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/114297.html","og_locale":"zh_CN","og_type":"article","og_title":"\u65e5\u5fd7\u91cc\u5168\u662f \\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u8fd9\u5468\u8fde\u7eed\u649e\u4e0a\u4e24\u6869\u602a\u4e8b&#xff1a;\u5148\u662f\u4e3a\u53cc\u5feb\u7167\u505a\u5185\u5bb9\u6307\u7eb9&#xff0c;\u4e24\u4efd\u4e00\u6a21\u4e00\u6837\u7684\u6570\u636e\u54c8\u5e0c\u6b7b\u6d3b\u5bf9\u4e0d\u4e0a&#xff1b;\u540e\u6765\u53c8\u53d1\u73b0\u7d27\u51d1\u5e8f\u5217\u5316\u80fd\u7701\u4e0b\u5341\u51e0\u4e2a\u5b57\u8282&#xff0c;\u800c\u540c\u4e8b\u7684\u4ee3\u7801\u91cc\u600e\u4e48\u6539\u90fd\u7701\u4e0d\u51fa\u6765\u3002\u8ffd\u5230\u5e95&#xff0c;\u4e24\u6869\u90fd\u662f\u540c\u4e00\u4e2a\u6e90\u5934\u2014\u2014json.dumps \u7684\u9ed8\u8ba4\u53c2\u6570\u3002\u5b83\u6709\u56db\u4e2a\u9ed8\u8ba4\u503c&#xff0c;\u6bcf\u4e00\u4e2a\u90fd\u66fe\u5728\u771f\u5b9e\u6570\u636e\u4e0a\u54ac\u8fc7\u4eba\u3002\u8fd9\u7bc7\u628a\u5b83\u4eec\u9010\u4e00\u5b9e\u6d4b&#xff08;Python 3.13.12&#xff09;&#xff0c;\u8d26\u5355\u5982\u4e0b\u3002 \u6587\u7ae0\u76ee\u5f55\u4e00\u3001ensure_as","og_url":"https:\/\/www.wsisp.com\/helps\/114297.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-08T14:09:12+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261008140906-6ac7a40280b14.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/114297.html","url":"https:\/\/www.wsisp.com\/helps\/114297.html","name":"\u65e5\u5fd7\u91cc\u5168\u662f \\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-08T14:09:12+00:00","dateModified":"2026-10-08T14:09:12+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/114297.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/114297.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/114297.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u65e5\u5fd7\u91cc\u5168\u662f \\\\uXXXX\uff1fjson.dumps \u56db\u4e2a\u9ed8\u8ba4\u53c2\u6570\u7684\u5b9e\u6d4b\u8d26\u5355"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/114297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=114297"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/114297\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/114292"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=114297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=114297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=114297"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=114297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}