{"id":64791,"date":"2025-05-03T16:20:55","date_gmt":"2025-05-03T08:20:55","guid":{"rendered":"https:\/\/fwq.ai\/blog\/64791\/"},"modified":"2025-05-03T16:20:55","modified_gmt":"2025-05-03T08:20:55","slug":"fastjson%e8%a7%a3%e6%9e%90%e5%a4%a7%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%8a%a5%e5%bc%82%e5%b8%b8%e6%80%8e%e4%b9%88%e5%8a%9e%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/64791\/","title":{"rendered":"FastJSON\u89e3\u6790\u5927\u5b57\u7b26\u4e32\u62a5\u5f02\u5e38\u600e\u4e48\u529e\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173076894315545.jpg\" class=\"aligncenter\" title=\"FastJSON\u89e3\u6790\u5927\u5b57\u7b26\u4e32\u62a5\u5f02\u5e38\u600e\u4e48\u529e\uff1f\u63d2\u56fe\" alt=\"FastJSON\u89e3\u6790\u5927\u5b57\u7b26\u4e32\u62a5\u5f02\u5e38\u600e\u4e48\u529e\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>FastJSON \u89e3\u6790\u5927\u5b57\u7b26\u4e32\u62a5\u5f02\u5e38\u7684\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>\u4f7f\u7528 FastJSON \u7684 parseObject() \u65b9\u6cd5\u89e3\u6790 2M \u5927\u5c0f\u7684\u5b57\u7b26\u4e32\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u89e3\u6790\u9519\u8bef\u3002\u9488\u5bf9\u8fd9\u79cd\u60c5\u51b5\uff0c\u6709\u4ee5\u4e0b\u4e24\u79cd\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<p><strong>1. \u8fc1\u79fb\u81f3\u5176\u4ed6 JSON \u89e3\u6790\u5de5\u5177<\/strong><\/p>\n<p>\u76ee\u524d\u63a8\u8350\u4f7f\u7528 Jackson \u4f5c\u4e3a\u66ff\u4ee3\u65b9\u6848\u3002Jackson \u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684 JSON \u89e3\u6790\u5e93\uff0c\u53ef\u4ee5\u9ad8\u6548\u5904\u7406\u5927\u5b57\u7b26\u4e32\u3002<\/p>\n<p><strong>2. \u4fee\u6539 FastJSON \u89e3\u6790\u4ee3\u7801\uff08\u4e0d\u63a8\u8350\uff09<\/strong><\/p>\n<p>\u867d\u7136\u4e0d\u63a8\u8350\u4fee\u6539 FastJSON \u7684\u4ee3\u7801\uff0c\u4f46\u5982\u679c\u4e0d\u5f97\u5df2\u9700\u8981\u7684\u8bdd\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li> <strong>\u589e\u52a0\u89e3\u6790\u7f13\u51b2\u533a\u5927\u5c0f\uff1a<\/strong>\u5728\u8c03\u7528 parseObject() \u65b9\u6cd5\u4e4b\u524d\uff0c\u901a\u8fc7\u8bbe\u7f6e ParserConfig \u7684 setParserFeature \u65b9\u6cd5\u6765\u589e\u52a0\u89e3\u6790\u7f13\u51b2\u533a\u5927\u5c0f\u3002<\/li>\n<li> <strong>\u7981\u7528\u7b26\u53f7\u8868\uff1a<\/strong>\u7981\u7528\u7b26\u53f7\u8868\u53ef\u4ee5\u51cf\u5c11 FastJSON \u89e3\u6790\u5927\u5b57\u7b26\u4e32\u65f6\u7684\u5185\u5b58\u6d88\u8017\u3002\u901a\u8fc7\u5728\u8c03\u7528 parseObject() \u65b9\u6cd5\u4e4b\u524d\u8bbe\u7f6e ParserConfig \u7684 setSymbolTable \u65b9\u6cd5\u4e3a null \u6765\u7981\u7528\u7b26\u53f7\u8868\u3002<\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>\u4fee\u6539 FastJSON \u4ee3\u7801\u53ef\u80fd\u5bfc\u81f4\u4e0d\u7a33\u5b9a\u6216\u4e0d\u517c\u5bb9\u3002<\/li>\n<li>\u5728\u4f7f\u7528\u4fee\u6539\u540e\u7684\u4ee3\u7801\u4e4b\u524d\uff0c\u5fc5\u987b\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\u3002<\/li>\n<li>\u4f18\u5148\u63a8\u8350\u8fc1\u79fb\u81f3 Jackson \u7b49\u5176\u4ed6 JSON \u89e3\u6790\u5de5\u5177\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662fFastJSON\u89e3\u6790\u5927\u5b57\u7b26\u4e32\u62a5\u5f02\u5e38\u600e\u4e48\u529e\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FastJSON \u89e3\u6790\u5927\u5b57\u7b26\u4e32\u62a5\u5f02\u5e38\u7684\u89e3\u51b3\u65b9\u6cd5 \u4f7f\u7528 FastJSON \u7684 parseObject() \u65b9\u6cd5\u89e3\u6790 2M \u5927\u5c0f\u7684\u5b57\u7b26\u4e32\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u89e3\u6790\u9519\u8bef\u3002\u9488\u5bf9\u8fd9\u79cd\u60c5\u51b5\uff0c\u6709\u4ee5\u4e0b\u4e24\u79cd\u89e3\u51b3\u65b9\u6848\uff1a 1. \u8fc1\u79fb\u81f3\u5176\u4ed6 JSON \u89e3\u6790\u5de5\u5177 \u76ee\u524d\u63a8\u8350\u4f7f\u7528 Jackson \u4f5c\u4e3a\u66ff\u4ee3\u65b9\u6848\u3002Jackson \u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684 JSON \u89e3\u6790\u5e93\uff0c\u53ef\u4ee5\u9ad8\u6548\u5904\u7406\u5927\u5b57\u7b26\u4e32\u3002 2. \u4fee\u6539 FastJSON \u89e3\u6790\u4ee3\u7801\uff08\u4e0d\u63a8\u8350\uff09 \u867d\u7136\u4e0d\u63a8\u8350\u4fee\u6539 FastJSON \u7684\u4ee3\u7801\uff0c\u4f46\u5982\u679c\u4e0d\u5f97\u5df2\u9700\u8981\u7684\u8bdd\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u65b9\u6cd5\uff1a \u589e\u52a0\u89e3\u6790\u7f13\u51b2\u533a\u5927\u5c0f\uff1a\u5728\u8c03\u7528 parseObject() \u65b9\u6cd5\u4e4b\u524d\uff0c\u901a\u8fc7\u8bbe\u7f6e ParserConfig \u7684 setParserFeature \u65b9\u6cd5\u6765\u589e\u52a0\u89e3\u6790\u7f13\u51b2\u533a\u5927\u5c0f\u3002 \u7981\u7528\u7b26\u53f7\u8868\uff1a\u7981\u7528\u7b26\u53f7\u8868\u53ef\u4ee5\u51cf\u5c11 FastJSON \u89e3\u6790\u5927\u5b57\u7b26\u4e32\u65f6\u7684\u5185\u5b58\u6d88\u8017\u3002\u901a\u8fc7\u5728\u8c03\u7528 parseObject() \u65b9\u6cd5\u4e4b\u524d\u8bbe\u7f6e ParserConfig \u7684 setSymbolTable \u65b9\u6cd5\u4e3a null \u6765\u7981\u7528\u7b26\u53f7\u8868\u3002 \u6ce8\u610f\uff1a \u4fee\u6539 FastJSON \u4ee3\u7801\u53ef\u80fd\u5bfc\u81f4\u4e0d\u7a33\u5b9a\u6216\u4e0d\u517c\u5bb9\u3002 \u5728\u4f7f\u7528\u4fee\u6539\u540e\u7684\u4ee3\u7801\u4e4b\u524d\uff0c\u5fc5\u987b\u8fdb\u884c\u5145\u5206\u7684\u6d4b\u8bd5\u3002 \u4f18\u5148\u63a8\u8350\u8fc1\u79fb\u81f3 Jackson \u7b49\u5176\u4ed6 JSON \u89e3\u6790\u5de5\u5177\u3002 \u4ee5\u4e0a\u5c31\u662fFastJSON\u89e3\u6790\u5927\u5b57\u7b26\u4e32\u62a5\u5f02\u5e38\u600e\u4e48\u529e\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-64791","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/64791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=64791"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/64791\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=64791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=64791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=64791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}