{"id":11509,"date":"2025-01-22T23:22:42","date_gmt":"2025-01-22T15:22:42","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11509"},"modified":"2025-01-22T23:22:42","modified_gmt":"2025-01-22T15:22:42","slug":"js-api-structuredclone","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2025\/01\/js-api-structuredclone\/","title":{"rendered":"JS\u539f\u751f\u7684\u6df1\u62f7\u8d1dAPI structuredClone\u51fd\u6570\u7b80\u4ecb"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11509\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=11509<\/a><br \/>\n\u672c\u6587\u53ef\u5168\u6587\u8f6c\u8f7d\uff0c\u72ec\u7acb\u57df\u540d\u4e2a\u4eba\u7f51\u7ad9\u65e0\u9700\u6388\u6743\uff0c\u4f46\u9700\u8981\u4fdd\u7559\u539f\u4f5c\u8005\u3001\u51fa\u5904\u4ee5\u53ca\u6587\u4e2d\u94fe\u63a5\uff0c\u4efb\u4f55\u7f51\u7ad9\u5747\u53ef\u6458\u8981\u805a\u5408\uff0c\u5546\u7528\u8bf7\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/202501-deep-clone.png';<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202501\/2025-1-22_231844.png\" width=\"480\" height=\"300\" alt=\"\u6df1\u62f7\u8d1d\u793a\u610f\u56fe\" class=\"alignright clip thumb size-medium\" \/><\/p>\n<h3>\u4e00\u3001\u5f00\u95e8\u5373\u89c1\u5c71<\/h3>\n<p>\u76ee\u524d\uff0cWeb\u6d4f\u89c8\u5668\u63d0\u4f9b\u4e86\u539f\u751f\u7684Object\u5bf9\u8c61\u6df1\u5ea6\u514b\u9686\u65b9\u6cd5<code>structuredClone()<\/code>\u51fd\u6570\u3002<\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5\u5f88\u7b80\u5355\uff0cJS\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>\/\/ \u521b\u5efa\u4e00\u4e2a\u5177\u6709\u503c\u548c\u5faa\u73af\u5f15\u7528\u7684\u5bf9\u8c61\r\nconst original = { name: \"zhangxinxu\" };\r\noriginal.itself = original;\r\n\r\n\/\/ \u514b\u9686\r\nconst clone = structuredClone(original);\r\n\r\n\/\/ \u4e24\u8005\u5bf9\u8c61\u662f\u4e0d\u76f8\u7b49\u7684\r\nconsole.assert(clone !== original);\r\n\/\/ \u4e24\u8005\u7684\u503c\u662f\u76f8\u7b49\u7684\r\nconsole.assert(clone.name === \"zhangxinxu\"); \r\n\/\/ \u5e76\u4e14\u4fdd\u7559\u4e86\u5faa\u73af\u5f15\u7528\r\nconsole.assert(clone.itself === clone);<\/pre>\n<h4>\u8bed\u6cd5<\/h4>\n<p>\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre>structuredClone(value, options)<\/pre>\n<p>\u5176\u4e2d\uff1a<\/p>\n<dl>\n<dt><strong>value<\/strong><\/dt>\n<dd>\u9700\u8981\u88ab\u6df1\u62f7\u8d1d\u7684\u503c<\/dd>\n<dt><strong>options<\/strong><\/dt>\n<dd>\u53ef\u9009\u53c2\u6570\uff0c\u652f\u6301\u4e00\u4e2a\u540d\u4e3a<code>transfer<\/code>\u7684\u53c2\u6570\u503c\uff0c\u5176\u503c\u4e3a\u4e00\u7ec4\u53ef\u8f6c\u79fb\u7684\u5bf9\u8c61\uff0c\u5b83\u4eec\u5c06\u88ab\u79fb\u52a8\u800c\u4e0d\u662f\u514b\u9686\u5230\u8fd4\u56de\u7684\u5bf9\u8c61\u4e2d\u3002<\/dd>\n<\/dl>\n<p><strong>\u5173\u4e8etransfer<\/strong><\/p>\n<p>\u53ef\u9009\u53c2\u6570<code>transfer<\/code>\u591a\u7528\u5728\u4e00\u4e9b\u5927\u6570\u636e\u4f20\u8f93\u4e2d\uff08\u8f6c\u79fb\u76f8\u6bd4\u514b\u9686\u53ef\u4ee5\u8282\u7ea6\u5185\u5b58\u5f00\u9500\uff09\uff0c\u8fd9\u91cc\u6709\u4e2a\u6848\u4f8b\u4f9b\u5927\u5bb6\u53c2\u8003\uff1a<\/p>\n<pre>const original = new Uint8Array(1024);\r\nconst clone = structuredClone(original);\r\nconsole.log(original.byteLength); \/\/ 1024\r\nconsole.log(clone.byteLength); \/\/ 1024\r\n\r\noriginal[0] = 1;\r\nconsole.log(clone[0]); \/\/ 0\r\n\r\n\/\/ \u8f6c\u79fbUint8Array\u4f1a\u5f15\u53d1\u5f02\u5e38\uff0c\u56e0\u4e3a\u5b83\u4e0d\u662f\u53ef\u8f6c\u79fb\u5bf9\u8c61\r\n\/\/ const transferred = structuredClone(original, {transfer: [original]});\r\n\r\n\/\/ \u6211\u4eec\u53ef\u4ee5\u8f6c\u79fbUint8Array.buffer\r\nconst transferred = structuredClone(original, { transfer: [original.buffer] });\r\nconsole.log(transferred.byteLength); \/\/ 1024\r\nconsole.log(transferred[0]); \/\/ 1\r\n\r\n\/\/ Uint8Array.buffer\u8f6c\u79fb\u540e\u5c31\u65e0\u6cd5\u4f7f\u7528\u4e86\r\nconsole.log(original.byteLength); \/\/ 0<\/pre>\n<h3>\u4e8c\u3001\u517c\u5bb9\u6027\u4e0ePolyfill\u65b9\u6cd5<\/h3>\n<p>window\u5168\u5c40\u7684<code>structuredClone()<\/code>\u65b9\u6cd5\u517c\u5bb9\u6027\u8fd8\u662f\u4e0d\u9519\u7684\uff0c\u76ee\u524d\u6240\u6709\u5e38\u89c1\u6d4f\u89c8\u5668\u90fd\u5df2\u7ecf\u652f\u6301\u4e86\uff0c\u5982\u4e0b\u622a\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202501\/2025-01-22_214928.png\" width=\"628\" height=\"222\" alt=\"structuredClone\u517c\u5bb9\u6027\u622a\u56fe\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u8003\u8651\u5230\u603b\u4f1a\u6709\u4e00\u4e9b\u7528\u6237\u624b\u673a\u820d\u4e0d\u5f97\u6216\u8005\u5fd8\u8bb0\u6216\u8005\u61d2\u5f97\u5347\u7ea7\uff0c\u9762\u5bf9\u504f\u5916\u90e8\u7528\u6237\u7684\u4ea7\u54c1\uff0c\u5efa\u8bae\u8fd8\u662f\u540c\u65f6\u5f15\u5165Polyfill\u3002<\/p>\n<h4>structuredClone Polyfill<\/h4>\n<p>JS\u4e0d\u540c\u4e8eCSS\uff0c\u8981\u662fJS\u67d0\u4e2a\u65b9\u6cd5\u4e0d\u652f\u6301\uff0c\u7136\u540e\u4f60\u53bb\u8fd0\u884c\u4ed6\uff0c\u5f88\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6574\u4e2a\u9875\u9762\u767d\u5c4f\uff0c\u8fd9\u662fVue\u548cReact\u9879\u76ee\u4e2d\u662f\u5e38\u6709\u7684\u4e8b\u60c5\uff08\u4e5f\u5305\u62ec\u5404\u7c7b\u5c0f\u7a0b\u5e8f\uff09\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u6211\u4eec\u9700\u8981\u5f15\u5165Polyfill\uff0c\u53ef\u4ee5\u8bd5\u8bd5\u8fd9\u4e2a\u9879\u76ee\uff1a<a href=\"https:\/\/github.com\/ungap\/structured-clone\" rel=\"noopener\" target=\"_blank\">https:\/\/github.com\/ungap\/structured-clone<\/a><\/p>\n<p>\u4f7f\u7528\u793a\u610f\uff1a<\/p>\n<pre>import structuredClone from '@ungap\/structured-clone';\r\nconst cloned = structuredClone({any: 'serializable'});<\/pre>\n<p>\u8fd8\u662f\u5f88easy\u7684\u5566\u3002<\/p>\n<p>\u5176\u5b9e\uff0c\u4e0a\u9762\u7684Polyfill\u8fd8\u6709\u4e0d\u5c11\u5176\u4ed6\u7684\u529f\u80fd\uff0c\u5c31\u7b49\u5927\u5bb6\u81ea\u884c\u53bb\u63a2\u7d22\u5566\u3002<\/p>\n<h3>\u4e09\u3001JSON\u7b49\u65b9\u6cd5\u6709\u4ec0\u4e48\u95ee\u9898<\/h3>\n<p>\u4e4b\u524d\u6211\u6df1\u5ea6\u62f7\u8d1d\u4e00\u4e2aObject\u5bf9\u8c61\u4f1a\u4f7f\u7528<code>JSON.parse(JSON.stringify(obj))<\/code>\u6765\u5b9e\u73b0\uff0c\u867d\u7136\u53ef\u4ee5\u6ee1\u8db3\u7edd\u5927\u591a\u6570\u7684\u573a\u666f\uff0c\u4f46\u6709\u65f6\u5019\u4f1a\u51fa\u95ee\u9898\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5f53\u5bf9\u8c61\u7684\u5c5e\u6027\u503c\u662f<code>Date()<\/code>\u5bf9\u8c61\u7684\u65f6\u5019\uff0c\u6848\u4f8b\u793a\u610f\uff1a<\/p>\n<pre>const originObj = {\r\n  name: \"zhangxinxu\",\r\n  date: new Date()\r\n};\r\n\r\nconst cloneObj = JSON.parse(JSON.stringify(originObj));\r\n\r\n\/\/ \u7ed3\u679c\u662f 'object'\r\nconsole.log(typeof originObj.date);\r\n\/\/ \u7ed3\u679c\u662f 'string'\r\nconsole.log(typeof cloneObj.date);<\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u672c\u5e94\u5b9e\u65f6\u663e\u793a\u5f53\u4e0b\u65f6\u95f4\u7684\u5c5e\u6027\u503c\u53d8\u6210\u4e86\u56fa\u5b9a\u6b7b\u7684\u5b57\u7b26\u4e32\u503c\uff08\u4e5f\u53ef\u4ee5\u770b\u622a\u56fe\u8fd0\u884c\u7ed3\u679c\uff09\uff0c\u8fd9\u5e76\u4e0d\u662f\u6211\u4eec\u5e0c\u671b\u770b\u5230\u7684\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202501\/2025-01-22_220821.png\" width=\"440\" height=\"258\" alt=\"JSON\u65b9\u6cd5\u53d8\u6210\u5b57\u7b26\u4e32\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u800c\u6d4f\u89c8\u5668\u63d0\u4f9b\u7684<code>structuredClone()<\/code>\u65b9\u6cd5\u5219\u6ca1\u6709\u8fd9\u4e2a\u95ee\u9898\uff0c\u4f7f\u7528\u793a\u610f\uff1a<\/p>\n<pre>const originObj = {\r\n  name: \"zhangxinxu\",\r\n  date: new Date()\r\n};\r\n\r\nconst cloneObj = structuredClone(originObj);\r\n\r\n\/\/ \u7ed3\u679c\u662f 'object'\r\nconsole.log(typeof originObj.date);\r\n\/\/ \u7ed3\u679c\u662f 'object'\r\nconsole.log(typeof cloneObj.date);<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202501\/2025-01-22_224922.png\" width=\"384\" height=\"279\" alt=\"Date\u590d\u5236\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5f53\u7136\uff0c\u8fd8\u5305\u62ec\u5f88\u591a\u5176\u4ed6\u7c7b\u578b\u7684\u5bf9\u8c61\u4e5f\u662f\u5982\u6b64\uff0c\u5305\u62ec\uff1aDate, Set, Map, Error, RegExp, ArrayBuffer, Blob, File, ImageData\u7b49\u3002<\/p>\n<h4>\u70b9\u70b9\u70b9\u6216\u8005Object\u65b9\u6cd5\u7684\u95ee\u9898<\/h4>\n<p>\u5982\u679c\u9700\u8981\u590d\u5236\u7684\u5bf9\u8c61\u5c42\u7ea7\u7b80\u5355\uff0c\u90a3\u4e48\u6211\u4eec\u4f7f\u7528\u70b9\u70b9\u70b9\uff0c\u6216\u8005<code>Object.assign()<\/code>\u3001<code>Object.create()<\/code>\u65b9\u6cd5\u662f\u6ca1\u95ee\u9898\u7684\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>const originObj = {\r\n  name: \"zhangxinxu\"\r\n};\r\n\/\/ ok\u6ca1\u95ee\u9898\r\nconst cloneObj = { ... originObj }\r\n\/\/ ok\u6ca1\u95ee\u9898\r\nconst cloneObj = Object.assign({}, originObj)\r\n\/\/ ok\u6ca1\u95ee\u9898\r\nconst cloneObj = Object.create(originObj)<\/pre>\n<p>\u53ef\u5982\u679c\u5bf9\u8c61\u7684\u5c5e\u6027\u503c\u4e5f\u662f\u4e2a\u5bf9\u8c61\uff0c\u90a3\u4e48\u4e0a\u9762\u7684\u65b9\u6cd5\u5c31\u6709\u95ee\u9898\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>const originObj = {\r\n  name: \"zhangxinxu\",\r\n  books: ['CSS\u4e16\u754c']\r\n};\r\n\/\/ ok\u6ca1\u95ee\u9898\r\nconst cloneObj = { ... originObj }\r\ncloneObj.books.push('HTML\u5e76\u4e0d\u7b80\u5355');\r\n\/\/ \u7ed3\u679c\u539f\u5bf9\u8c61\u7684books\u4e5f\u4e00\u8d77\u53d8\u5316\u4e86\r\nconsole.log(originObj.books);<\/pre>\n<p>\u63a7\u5236\u53f0\u8fd0\u884c\u7ed3\u679c\u4e0d\u4f1a\u9a97\u4eba\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202501\/2025-01-22_230040.png\" width=\"356\" height=\"238\" alt=\"\u5d4c\u5957\u7ed3\u6784\u6709\u95ee\u9898\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<h3>\u56db\u3001structuredClone\u4e0d\u80fd\u7684\u5c40\u9650<\/h3>\n<p> \u5f53\u7136\uff0c<code>structuredClone<\/code>\u65b9\u6cd5\u4e5f\u4e0d\u662f\u4e07\u80fd\u7684\uff0c\u4f8b\u5982DOM\u5bf9\u8c61\u662f\u4e0d\u80fd\u53c2\u4e0e\u590d\u5236\u7684\u3002<\/p>\n<pre>\/\/ \u4f1a\u62a5\u9519\r\nstructuredClone({ el: document.body })<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202501\/2025-01-22_230253.png\" width=\"637\" height=\"135\" alt=\"DOM\u5bf9\u8c61\u4e0d\u80fd\u590d\u5236\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u51fd\u6570\u4e5f\u4e0d\u80fd\u590d\u5236\uff1a<\/p>\n<pre>\/\/ \u4f1a\u62a5\u9519\r\nstructuredClone({ fn: () =&gt; { } })<\/pre>\n<h4>\u5c5e\u6027\u63cf\u8ff0\u7b26\u3001setter\u548cgetter<\/h4>\n<p>\u6807\u9898\u8fd9\u4e9b\u7c7b\u578b\u7684\u4e1c\u897f\u4e5f\u4e0d\u4f1a\u88ab\u6df1\u5ea6\u590d\u5236\uff0c\u6bd4\u65b9\u8bf4\u50cfgetter\uff0c\u514b\u9686\u7684\u4f1a\u662f\u5176\u503c\uff0c\u800c\u4e0d\u662fgetter\u51fd\u6570\u672c\u8eab\u3002<\/p>\n<pre>structuredClone({ get foo() { return 'bar' } })\r\n\/\/ \u7ed3\u679c\uff1a { foo: 'bar' }<\/pre>\n<h4>\u5bf9\u8c61\u539f\u578b<\/h4>\n<p>\u539f\u578b\u94fe\u4e5f\u662f\u4e0d\u4f1a\u88ab\u590d\u5236\u7684\uff0c\u56e0\u6b64\uff0c\u5982\u679c\u514b\u9686MyClass\u7684\u5b9e\u4f8b\uff0c\u514b\u9686\u7684\u5bf9\u8c61\u5c06\u4e0d\u518d\u662f\u8be5\u7c7b\u7684\u5b9e\u4f8b\uff08\u4f46\u8be5\u7c7b\u7684\u6240\u6709\u6709\u6548\u5c5e\u6027\u90fd\u5c06\u88ab\u514b\u9686\uff09<\/p>\n<pre>class MyClass { \r\n  foo = 'bar' \r\n  myMethod() { \/* ... *\/ }\r\n}\r\nconst myClass = new MyClass()\r\n\r\nconst cloned = structuredClone(myClass)\r\n\/\/ \u7ed3\u679c { foo: 'bar' }\r\n\r\ncloned instanceof myClass \/\/ false<\/pre>\n<h3>\u4e94\u3001\u86c7\u5e74\u5feb\u4e50<\/h3>\n<p>\u597d\uff0c\u672c\u6587\u7684\u5185\u5bb9\u5c31\u8fd9\u4e9b\uff0c\u5e94\u8be5\u662f\u6625\u8282\u524d\u7684\u6700\u540e\u4e00\u7bc7\u6587\u7ae0\u4e86\uff0c\u672c\u6765\u4ee5\u4e3a\u5185\u5bb9\u4e0d\u591a\uff0c\u4f46\u5199\u7740\u5199\u7740\uff0c\u53d1\u73b0\u91cc\u9762\u53ef\u8bb2\u7684\u4e1c\u897f\u8fd8\u4e0d\u5c11\u3002<\/p>\n<p>\u6211\u660e\u5929\u5c31\u8bf7\u5047\u56de\u8001\u5bb6\u4e86\uff0c\u7b97\u7b97\uff0c\u53ef\u4ee5\u8fde\u4f1112\u5929\uff0c\u8fd8\u771f\u662f\u5bcc\u88d5\u7684\u5047\u671f\u3002<\/p>\n<p>\u5c31\u662f\u8fc7\u5e74\u5f88\u591a\u9c7c\u5858\u4e0d\u5f00\u95e8\uff0c\u60f3\u8981\u51fa\u53bb\u9493\u9c7c\uff0c\u8fd8\u6709\u4e9b\u56f0\u96be\u3002<\/p>\n<p>\u5509\uff0c\u518d\u8bf4\u5427\u3002<\/p>\n<p>\u8bdd\u4e0d\u591a\u8bf4\uff0c\u795d\u5927\u5bb6\u86c7\u5e74\u5feb\u4e50\uff0c\u4e07\u4e8b\u5982\u610f\u3002<\/p>\n<p>\u5728\u5bb6\u8981\u662f\u65e0\u804a\uff0c\u53ef\u4ee5\u770b\u770b\u6280\u672f\u4e66\u7c4d <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202501\/2025-1-22_231327.jpeg\" width=\"24\" height=\"22\" class=\"alignnone size-medium\" \/><\/p>\n<p><a href=\"https:\/\/item.jd.com\/14213015.html\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" itemprop=\"image\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202407\/bookcover-html.jpg\" width=\"120\" alt=\"HTML\u5e76\u4e0d\u7b80\u5355\u4e66\u5c01\"><\/a><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u4f1a\u7ecf\u5e38\u66f4\u65b0\u77e5\u8bc6\u70b9\u4ee5\u53ca\u4fee\u6b63\u4e00\u4e9b\u9519\u8bef\uff0c\u56e0\u6b64\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u539f\u51fa\u5904\uff0c\u65b9\u4fbf\u6eaf\u6e90\uff0c\u907f\u514d\u9648\u65e7\u9519\u8bef\u77e5\u8bc6\u7684\u8bef\u5bfc\uff0c\u540c\u65f6\u6709\u66f4\u597d\u7684\u9605\u8bfb\u4f53\u9a8c\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11509\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=11509<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202501\/2025-1-22_231844.png\" width=\"160\" height=\"100\" alt=\"\u6df1\u62f7\u8d1d\u793a\u610f\u56fe\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>Web\u6d4f\u89c8\u5668\u63d0\u4f9b\u4e86\u539f\u751f\u7684Object\u5bf9\u8c61\u6df1\u5ea6\u514b\u9686\u65b9\u6cd5structuredClone()\u51fd\u6570\uff0c\u672c\u4ee5\u4e3a\u5185\u5bb9\u4e0d\u591a\uff0c\u5199\u7740\u5199\u7740\u53d1\u73b0\u53ef\u8bb2\u7684\u4e1c\u897f\u8fd8\u771f\u4e0d\u5c11\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1284],"tags":[215,812,1305,2031,553,1235,2030,2032,2023],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11509"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=11509"}],"version-history":[{"count":6,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11509\/revisions"}],"predecessor-version":[{"id":11565,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11509\/revisions\/11565"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=11509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=11509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=11509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}