{"id":6963,"date":"2024-11-14T09:02:44","date_gmt":"2024-11-14T01:02:44","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6963\/"},"modified":"2024-11-14T09:02:44","modified_gmt":"2024-11-14T01:02:44","slug":"mysql-%e5%a6%82%e4%bd%95%e5%ad%98%e5%82%a8%e5%92%8c%e6%9f%a5%e8%af%a2-json-%e5%ad%97%e6%ae%b5%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6963\/","title":{"rendered":"MySQL \u5982\u4f55\u5b58\u50a8\u548c\u67e5\u8be2 JSON \u5b57\u6bb5\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173019088513370.jpg\" class=\"aligncenter\" title=\"MySQL \u5982\u4f55\u5b58\u50a8\u548c\u67e5\u8be2 JSON \u5b57\u6bb5\uff1f\u63d2\u56fe\" alt=\"MySQL \u5982\u4f55\u5b58\u50a8\u548c\u67e5\u8be2 JSON \u5b57\u6bb5\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL JSON \u5b57\u6bb5\u7684\u5185\u90e8\u8fd0\u4f5c\u673a\u5236<\/strong><\/p>\n<p><strong>JSON \u5b57\u6bb5\u7684\u5e95\u5c42\u5b9e\u73b0<\/strong><\/p>\n<p>MySQL \u4e2d\u7684 JSON \u5b57\u6bb5\u672c\u8d28\u4e0a\u662f\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32 (BLOB)\uff0c\u4ee5 UTF8MB4 \u7f16\u7801\u5b58\u50a8\u3002\u8fd9\u79cd\u4e8c\u8fdb\u5236\u5b58\u50a8\u65b9\u5f0f\u5141\u8bb8\u5feb\u901f\u68c0\u7d22\uff0c\u56e0\u4e3a MySQL \u65e0\u9700\u5b8c\u5168\u53cd\u5e8f\u5217\u5316\u6574\u4e2a JSON \u6587\u6863\u3002<\/p>\n<p><strong>\u67e5\u8be2\u4f18\u5316<\/strong><\/p>\n<p>\u4e3a\u4e86\u63d0\u9ad8\u67e5\u8be2\u6027\u80fd\uff0cMySQL \u91c7\u7528\u4e86\u7c7b JsonPath \u7684\u8bed\u6cd5\uff0c\u4f7f\u89e3\u6790\u5668\u80fd\u591f\u4ec5\u53cd\u5e8f\u5217\u5316\u6240\u9700\u7684\u5b57\u6bb5\u3002\u8fd9\u6bd4\u4f20\u7edf JSON \u53cd\u5e8f\u5217\u5316\u65b9\u6cd5\u66f4\u5feb\uff0c\u56e0\u4e3a\u5b83\u65e0\u9700\u5b8c\u5168\u53cd\u5e8f\u5217\u5316\u6587\u6863\u3002<\/p>\n<p><strong>B+ \u6811\u4e2d\u7684\u5b58\u50a8<\/strong><\/p>\n<p>JSON \u5b57\u6bb5\u5e76\u6ca1\u6709\u771f\u6b63\u201c\u878d\u5408\u201d\u5230 B+ \u6811\u4e2d\u3002B+ \u6811\u4e2d\u7684\u952e\u662f JSON \u5bf9\u8c61\u4e2d\u7684\u952e\uff0c\u800c\u503c\u6307\u5411\u5b58\u50a8\u76f8\u5e94 JSON \u6587\u6863\u7684 BLOB\u3002<\/p>\n<p><strong>MongoDB \u7684 BSON \u5b58\u50a8<\/strong><\/p>\n<p>MongoDB \u4f7f\u7528 BSON \u683c\u5f0f\u5b58\u50a8\u6570\u636e\uff0c\u8fd9\u662f\u4e00\u79cd\u4e8c\u8fdb\u5236\u5f62\u5f0f\u7684 JSON\u3002\u867d\u7136 BSON \u4e0e JSON \u517c\u5bb9\uff0c\u4f46\u5b83\u672c\u8d28\u4e0a\u662f\u4e00\u79cd K\/V \u7ed3\u6784\uff0c\u7d22\u5f15\u57fa\u4e8e\u6587\u6863\u4e2d\u7684\u5b57\u6bb5\u952e\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL \u5982\u4f55\u5b58\u50a8\u548c\u67e5\u8be2 JSON \u5b57\u6bb5\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL JSON \u5b57\u6bb5\u7684\u5185\u90e8\u8fd0\u4f5c\u673a\u5236 JSON \u5b57\u6bb5\u7684\u5e95\u5c42\u5b9e\u73b0 MySQL \u4e2d\u7684 JSON \u5b57\u6bb5\u672c\u8d28\u4e0a\u662f\u4e8c\u8fdb\u5236\u5b57\u7b26\u4e32 (BLOB)\uff0c\u4ee5 UTF8MB4 \u7f16\u7801\u5b58\u50a8\u3002\u8fd9\u79cd\u4e8c\u8fdb\u5236\u5b58\u50a8\u65b9\u5f0f\u5141\u8bb8\u5feb\u901f\u68c0\u7d22\uff0c\u56e0\u4e3a MySQL \u65e0\u9700\u5b8c\u5168\u53cd\u5e8f\u5217\u5316\u6574\u4e2a JSON \u6587\u6863\u3002 \u67e5\u8be2\u4f18\u5316 \u4e3a\u4e86\u63d0\u9ad8\u67e5\u8be2\u6027\u80fd\uff0cMySQL \u91c7\u7528\u4e86\u7c7b JsonPath \u7684\u8bed\u6cd5\uff0c\u4f7f\u89e3\u6790\u5668\u80fd\u591f\u4ec5\u53cd\u5e8f\u5217\u5316\u6240\u9700\u7684\u5b57\u6bb5\u3002\u8fd9\u6bd4\u4f20\u7edf JSON \u53cd\u5e8f\u5217\u5316\u65b9\u6cd5\u66f4\u5feb\uff0c\u56e0\u4e3a\u5b83\u65e0\u9700\u5b8c\u5168\u53cd\u5e8f\u5217\u5316\u6587\u6863\u3002 B+ \u6811\u4e2d\u7684\u5b58\u50a8 JSON \u5b57\u6bb5\u5e76\u6ca1\u6709\u771f\u6b63\u201c\u878d\u5408\u201d\u5230 B+ \u6811\u4e2d\u3002B+ \u6811\u4e2d\u7684\u952e\u662f JSON \u5bf9\u8c61\u4e2d\u7684\u952e\uff0c\u800c\u503c\u6307\u5411\u5b58\u50a8\u76f8\u5e94 JSON \u6587\u6863\u7684 BLOB\u3002 MongoDB \u7684 BSON \u5b58\u50a8 MongoDB \u4f7f\u7528 BSON \u683c\u5f0f\u5b58\u50a8\u6570\u636e\uff0c\u8fd9\u662f\u4e00\u79cd\u4e8c\u8fdb\u5236\u5f62\u5f0f\u7684 JSON\u3002\u867d\u7136 BSON \u4e0e JSON \u517c\u5bb9\uff0c\u4f46\u5b83\u672c\u8d28\u4e0a\u662f\u4e00\u79cd K\/V \u7ed3\u6784\uff0c\u7d22\u5f15\u57fa\u4e8e\u6587\u6863\u4e2d\u7684\u5b57\u6bb5\u952e\u3002 \u4ee5\u4e0a\u5c31\u662fMySQL \u5982\u4f55\u5b58\u50a8\u548c\u67e5\u8be2 JSON \u5b57\u6bb5\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\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-6963","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6963","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=6963"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6963\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}