[{"data":1,"prerenderedAt":730},["ShallowReactive",2],{"post-/blog/json-pointer":3,"related-/blog/json-pointer":139},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"keywords":12,"body":16,"_type":133,"_id":134,"_source":135,"_file":136,"_stem":137,"_extension":138},"/blog/json-pointer","blog",false,"","JSON Pointer 详解","JSON Pointer (RFC 6901) 用斜杠路径定位 JSON 节点，如 /a/b/0。","2026-08-19","进阶",[13,14,15],"json pointer","rfc 6901","json路径",{"type":17,"children":18,"toc":125},"root",[19,27,33,39,44,50,55,60,82,87,109,114,119],{"type":20,"tag":21,"props":22,"children":24},"element","h1",{"id":23},"json-pointer-详解",[25],{"type":26,"value":8},"text",{"type":20,"tag":28,"props":29,"children":30},"p",{},[31],{"type":26,"value":32},"JSON Pointer 是 RFC 6901 定义的用斜杠分隔路径定位 JSON 节点的语法，是 JSON Patch 的基础。",{"type":20,"tag":34,"props":35,"children":37},"h2",{"id":36},"语法",[38],{"type":26,"value":36},{"type":20,"tag":28,"props":40,"children":41},{},[42],{"type":26,"value":43},"以 / 开头，每段为键名或数组索引，如 /user/name、/list/0。特殊字符需转义。",{"type":20,"tag":34,"props":45,"children":47},{"id":46},"与-jsonpath-区别",[48],{"type":26,"value":49},"与 JSONPath 区别",{"type":20,"tag":28,"props":51,"children":52},{},[53],{"type":26,"value":54},"JSON Pointer 更简单，仅定位单一节点；JSONPath 支持通配与过滤，可返回多节点。",{"type":20,"tag":34,"props":56,"children":58},{"id":57},"代码示例",[59],{"type":26,"value":57},{"type":20,"tag":61,"props":62,"children":66},"pre",{"className":63,"code":64,"language":65,"meta":7,"style":7},"language-json shiki shiki-themes github-dark","/user/address/city\n","json",[67],{"type":20,"tag":68,"props":69,"children":70},"code",{"__ignoreMap":7},[71],{"type":20,"tag":72,"props":73,"children":76},"span",{"class":74,"line":75},"line",1,[77],{"type":20,"tag":72,"props":78,"children":80},{"style":79},"--shiki-default:#E1E4E8",[81],{"type":26,"value":64},{"type":20,"tag":34,"props":83,"children":85},{"id":84},"推荐在线工具",[86],{"type":26,"value":84},{"type":20,"tag":88,"props":89,"children":90},"ul",{},[91,101],{"type":20,"tag":92,"props":93,"children":94},"li",{},[95],{"type":20,"tag":96,"props":97,"children":99},"a",{"href":98},"/jsonpath",[100],{"type":26,"value":98},{"type":20,"tag":92,"props":102,"children":103},{},[104],{"type":20,"tag":96,"props":105,"children":107},{"href":106},"/tree",[108],{"type":26,"value":106},{"type":20,"tag":34,"props":110,"children":112},{"id":111},"小结",[113],{"type":26,"value":111},{"type":20,"tag":28,"props":115,"children":116},{},[117],{"type":26,"value":118},"JSON Pointer (RFC 6901) 用斜杠路径定位 JSON 节点，如 /a/b/0。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":120,"props":121,"children":122},"style",{},[123],{"type":26,"value":124},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":126,"depth":126,"links":127},2,[128,129,130,131,132],{"id":36,"depth":126,"text":36},{"id":46,"depth":126,"text":49},{"id":57,"depth":126,"text":57},{"id":84,"depth":126,"text":84},{"id":111,"depth":126,"text":111},"markdown","content:blog:json-pointer.md","content","blog/json-pointer.md","blog/json-pointer","md",[140,324,447,607],{"_path":141,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":142,"description":143,"date":10,"category":11,"keywords":144,"body":148,"_type":133,"_id":321,"_source":135,"_file":322,"_stem":323,"_extension":138},"/blog/json-api-spec","JSON:API 规范指南","JSON:API 是 RESTful API 的数据响应规范，统一资源、关系、分页、错误格式。",[145,146,147],"json:api","json api规范","restful",{"type":17,"children":149,"toc":314},[150,155,160,165,170,175,180,184,278,282,301,305,310],{"type":20,"tag":21,"props":151,"children":153},{"id":152},"jsonapi-规范指南",[154],{"type":26,"value":142},{"type":20,"tag":28,"props":156,"children":157},{},[158],{"type":26,"value":159},"JSON:API 是一套构建 RESTful API 数据响应的规范，统一了资源对象、关系、分页与错误的 JSON 结构。",{"type":20,"tag":34,"props":161,"children":163},{"id":162},"核心约定",[164],{"type":26,"value":162},{"type":20,"tag":28,"props":166,"children":167},{},[168],{"type":26,"value":169},"data 包含资源数组或单对象，relationships 描述关联，included 包含关联资源，meta 存元信息。",{"type":20,"tag":34,"props":171,"children":173},{"id":172},"优势",[174],{"type":26,"value":172},{"type":20,"tag":28,"props":176,"children":177},{},[178],{"type":26,"value":179},"统一格式减少约定成本，客户端可通用化处理。",{"type":20,"tag":34,"props":181,"children":182},{"id":57},[183],{"type":26,"value":57},{"type":20,"tag":61,"props":185,"children":187},{"className":63,"code":186,"language":65,"meta":7,"style":7},"{\"data\": [{\"type\": \"user\", \"id\": \"1\", \"attributes\": {\"name\": \"x\"}}]}\n",[188],{"type":20,"tag":68,"props":189,"children":190},{"__ignoreMap":7},[191],{"type":20,"tag":72,"props":192,"children":193},{"class":74,"line":75},[194,199,205,210,215,220,226,231,236,240,245,249,254,259,264,268,273],{"type":20,"tag":72,"props":195,"children":196},{"style":79},[197],{"type":26,"value":198},"{",{"type":20,"tag":72,"props":200,"children":202},{"style":201},"--shiki-default:#79B8FF",[203],{"type":26,"value":204},"\"data\"",{"type":20,"tag":72,"props":206,"children":207},{"style":79},[208],{"type":26,"value":209},": [{",{"type":20,"tag":72,"props":211,"children":212},{"style":201},[213],{"type":26,"value":214},"\"type\"",{"type":20,"tag":72,"props":216,"children":217},{"style":79},[218],{"type":26,"value":219},": ",{"type":20,"tag":72,"props":221,"children":223},{"style":222},"--shiki-default:#9ECBFF",[224],{"type":26,"value":225},"\"user\"",{"type":20,"tag":72,"props":227,"children":228},{"style":79},[229],{"type":26,"value":230},", ",{"type":20,"tag":72,"props":232,"children":233},{"style":201},[234],{"type":26,"value":235},"\"id\"",{"type":20,"tag":72,"props":237,"children":238},{"style":79},[239],{"type":26,"value":219},{"type":20,"tag":72,"props":241,"children":242},{"style":222},[243],{"type":26,"value":244},"\"1\"",{"type":20,"tag":72,"props":246,"children":247},{"style":79},[248],{"type":26,"value":230},{"type":20,"tag":72,"props":250,"children":251},{"style":201},[252],{"type":26,"value":253},"\"attributes\"",{"type":20,"tag":72,"props":255,"children":256},{"style":79},[257],{"type":26,"value":258},": {",{"type":20,"tag":72,"props":260,"children":261},{"style":201},[262],{"type":26,"value":263},"\"name\"",{"type":20,"tag":72,"props":265,"children":266},{"style":79},[267],{"type":26,"value":219},{"type":20,"tag":72,"props":269,"children":270},{"style":222},[271],{"type":26,"value":272},"\"x\"",{"type":20,"tag":72,"props":274,"children":275},{"style":79},[276],{"type":26,"value":277},"}}]}\n",{"type":20,"tag":34,"props":279,"children":280},{"id":84},[281],{"type":26,"value":84},{"type":20,"tag":88,"props":283,"children":284},{},[285,293],{"type":20,"tag":92,"props":286,"children":287},{},[288],{"type":20,"tag":96,"props":289,"children":291},{"href":290},"/format",[292],{"type":26,"value":290},{"type":20,"tag":92,"props":294,"children":295},{},[296],{"type":20,"tag":96,"props":297,"children":299},{"href":298},"/validate",[300],{"type":26,"value":298},{"type":20,"tag":34,"props":302,"children":303},{"id":111},[304],{"type":26,"value":111},{"type":20,"tag":28,"props":306,"children":307},{},[308],{"type":26,"value":309},"JSON:API 是 RESTful API 的数据响应规范，统一资源、关系、分页、错误格式。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":120,"props":311,"children":312},{},[313],{"type":26,"value":124},{"title":7,"searchDepth":126,"depth":126,"links":315},[316,317,318,319,320],{"id":162,"depth":126,"text":162},{"id":172,"depth":126,"text":172},{"id":57,"depth":126,"text":57},{"id":84,"depth":126,"text":84},{"id":111,"depth":126,"text":111},"content:blog:json-api-spec.md","blog/json-api-spec.md","blog/json-api-spec",{"_path":325,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":326,"description":327,"date":10,"category":11,"keywords":328,"body":332,"_type":133,"_id":444,"_source":135,"_file":445,"_stem":446,"_extension":138},"/blog/json-deserialization","JSON 反序列化注意事项","JSON 反序列化将字符串转为对象，需注意类型丢失、精度、安全与错误处理。",[329,330,331],"json反序列化","json parse","反序列化",{"type":17,"children":333,"toc":437},[334,339,344,349,354,359,364,368,403,407,424,428,433],{"type":20,"tag":21,"props":335,"children":337},{"id":336},"json-反序列化注意事项",[338],{"type":26,"value":326},{"type":20,"tag":28,"props":340,"children":341},{},[342],{"type":26,"value":343},"JSON 反序列化将 JSON 字符串解析为内存对象，过程中需注意类型、精度与安全。",{"type":20,"tag":34,"props":345,"children":347},{"id":346},"常见问题",[348],{"type":26,"value":346},{"type":20,"tag":28,"props":350,"children":351},{},[352],{"type":26,"value":353},"大整数精度丢失（JS Number 限制）、日期需手动转换、类型信息丢失、非法 JSON 抛错。",{"type":20,"tag":34,"props":355,"children":357},{"id":356},"安全",[358],{"type":26,"value":356},{"type":20,"tag":28,"props":360,"children":361},{},[362],{"type":26,"value":363},"避免 eval 解析（注入风险），使用 JSON.parse；注意原型链污染。",{"type":20,"tag":34,"props":365,"children":366},{"id":57},[367],{"type":26,"value":57},{"type":20,"tag":61,"props":369,"children":371},{"className":63,"code":370,"language":65,"meta":7,"style":7},"JSON.parse('{\"a\":1}')\n",[372],{"type":20,"tag":68,"props":373,"children":374},{"__ignoreMap":7},[375],{"type":20,"tag":72,"props":376,"children":377},{"class":74,"line":75},[378,383,388,393,398],{"type":20,"tag":72,"props":379,"children":380},{"style":79},[381],{"type":26,"value":382},"JSON.parse('{",{"type":20,"tag":72,"props":384,"children":385},{"style":201},[386],{"type":26,"value":387},"\"a\"",{"type":20,"tag":72,"props":389,"children":390},{"style":79},[391],{"type":26,"value":392},":",{"type":20,"tag":72,"props":394,"children":395},{"style":201},[396],{"type":26,"value":397},"1",{"type":20,"tag":72,"props":399,"children":400},{"style":79},[401],{"type":26,"value":402},"}')\n",{"type":20,"tag":34,"props":404,"children":405},{"id":84},[406],{"type":26,"value":84},{"type":20,"tag":88,"props":408,"children":409},{},[410,417],{"type":20,"tag":92,"props":411,"children":412},{},[413],{"type":20,"tag":96,"props":414,"children":415},{"href":298},[416],{"type":26,"value":298},{"type":20,"tag":92,"props":418,"children":419},{},[420],{"type":20,"tag":96,"props":421,"children":422},{"href":290},[423],{"type":26,"value":290},{"type":20,"tag":34,"props":425,"children":426},{"id":111},[427],{"type":26,"value":111},{"type":20,"tag":28,"props":429,"children":430},{},[431],{"type":26,"value":432},"JSON 反序列化将字符串转为对象，需注意类型丢失、精度、安全与错误处理。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":120,"props":434,"children":435},{},[436],{"type":26,"value":124},{"title":7,"searchDepth":126,"depth":126,"links":438},[439,440,441,442,443],{"id":346,"depth":126,"text":346},{"id":356,"depth":126,"text":356},{"id":57,"depth":126,"text":57},{"id":84,"depth":126,"text":84},{"id":111,"depth":126,"text":111},"content:blog:json-deserialization.md","blog/json-deserialization.md","blog/json-deserialization",{"_path":448,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":449,"description":450,"date":10,"category":11,"keywords":451,"body":455,"_type":133,"_id":604,"_source":135,"_file":605,"_stem":606,"_extension":138},"/blog/json-patch","JSON Patch 操作详解","JSON Patch (RFC 6902) 用一组操作描述 JSON 变更，支持 add/remove/replace/move/copy/test。",[452,453,454],"json patch","rfc 6902","json变更",{"type":17,"children":456,"toc":597},[457,462,467,472,477,482,487,491,562,566,584,588,593],{"type":20,"tag":21,"props":458,"children":460},{"id":459},"json-patch-操作详解",[461],{"type":26,"value":449},{"type":20,"tag":28,"props":463,"children":464},{},[465],{"type":26,"value":466},"JSON Patch 是 RFC 6902 定义的用操作数组描述 JSON 变更的格式，常用于增量更新与协同。",{"type":20,"tag":34,"props":468,"children":470},{"id":469},"操作类型",[471],{"type":26,"value":469},{"type":20,"tag":28,"props":473,"children":474},{},[475],{"type":26,"value":476},"add 添加、remove 删除、replace 替换、move 移动、copy 复制、test 测试。",{"type":20,"tag":34,"props":478,"children":480},{"id":479},"使用场景",[481],{"type":26,"value":479},{"type":20,"tag":28,"props":483,"children":484},{},[485],{"type":26,"value":486},"API 增量更新、协同编辑、版本差异表达。",{"type":20,"tag":34,"props":488,"children":489},{"id":57},[490],{"type":26,"value":57},{"type":20,"tag":61,"props":492,"children":494},{"className":63,"code":493,"language":65,"meta":7,"style":7},"[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"新值\"}]\n",[495],{"type":20,"tag":68,"props":496,"children":497},{"__ignoreMap":7},[498],{"type":20,"tag":72,"props":499,"children":500},{"class":74,"line":75},[501,506,511,515,520,525,530,534,539,543,548,552,557],{"type":20,"tag":72,"props":502,"children":503},{"style":79},[504],{"type":26,"value":505},"[{",{"type":20,"tag":72,"props":507,"children":508},{"style":201},[509],{"type":26,"value":510},"\"op\"",{"type":20,"tag":72,"props":512,"children":513},{"style":79},[514],{"type":26,"value":392},{"type":20,"tag":72,"props":516,"children":517},{"style":222},[518],{"type":26,"value":519},"\"replace\"",{"type":20,"tag":72,"props":521,"children":522},{"style":79},[523],{"type":26,"value":524},",",{"type":20,"tag":72,"props":526,"children":527},{"style":201},[528],{"type":26,"value":529},"\"path\"",{"type":20,"tag":72,"props":531,"children":532},{"style":79},[533],{"type":26,"value":392},{"type":20,"tag":72,"props":535,"children":536},{"style":222},[537],{"type":26,"value":538},"\"/name\"",{"type":20,"tag":72,"props":540,"children":541},{"style":79},[542],{"type":26,"value":524},{"type":20,"tag":72,"props":544,"children":545},{"style":201},[546],{"type":26,"value":547},"\"value\"",{"type":20,"tag":72,"props":549,"children":550},{"style":79},[551],{"type":26,"value":392},{"type":20,"tag":72,"props":553,"children":554},{"style":222},[555],{"type":26,"value":556},"\"新值\"",{"type":20,"tag":72,"props":558,"children":559},{"style":79},[560],{"type":26,"value":561},"}]\n",{"type":20,"tag":34,"props":563,"children":564},{"id":84},[565],{"type":26,"value":84},{"type":20,"tag":88,"props":567,"children":568},{},[569,577],{"type":20,"tag":92,"props":570,"children":571},{},[572],{"type":20,"tag":96,"props":573,"children":575},{"href":574},"/diff",[576],{"type":26,"value":574},{"type":20,"tag":92,"props":578,"children":579},{},[580],{"type":20,"tag":96,"props":581,"children":582},{"href":290},[583],{"type":26,"value":290},{"type":20,"tag":34,"props":585,"children":586},{"id":111},[587],{"type":26,"value":111},{"type":20,"tag":28,"props":589,"children":590},{},[591],{"type":26,"value":592},"JSON Patch (RFC 6902) 用一组操作描述 JSON 变更，支持 add/remove/replace/move/copy/test。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":120,"props":594,"children":595},{},[596],{"type":26,"value":124},{"title":7,"searchDepth":126,"depth":126,"links":598},[599,600,601,602,603],{"id":469,"depth":126,"text":469},{"id":479,"depth":126,"text":479},{"id":57,"depth":126,"text":57},{"id":84,"depth":126,"text":84},{"id":111,"depth":126,"text":111},"content:blog:json-patch.md","blog/json-patch.md","blog/json-patch",{"_path":608,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":609,"description":610,"date":10,"category":11,"keywords":611,"body":615,"_type":133,"_id":727,"_source":135,"_file":728,"_stem":729,"_extension":138},"/blog/json-performance","JSON 性能优化技巧","大 JSON 解析与传输优化：压缩、流式解析、字段裁剪、二进制替代方案。",[612,613,614],"json性能","json优化","大json",{"type":17,"children":616,"toc":720},[617,622,627,632,637,642,647,651,684,688,707,711,716],{"type":20,"tag":21,"props":618,"children":620},{"id":619},"json-性能优化技巧",[621],{"type":26,"value":609},{"type":20,"tag":28,"props":623,"children":624},{},[625],{"type":26,"value":626},"大 JSON 的解析与传输可能成为性能瓶颈，可通过多种手段优化。",{"type":20,"tag":34,"props":628,"children":630},{"id":629},"优化手段",[631],{"type":26,"value":629},{"type":20,"tag":28,"props":633,"children":634},{},[635],{"type":26,"value":636},"传输前 minify、gzip 压缩、流式解析（SAX）、按需裁剪字段、考虑 Protobuf/MessagePack。",{"type":20,"tag":34,"props":638,"children":640},{"id":639},"解析优化",[641],{"type":26,"value":639},{"type":20,"tag":28,"props":643,"children":644},{},[645],{"type":26,"value":646},"选用高性能库（如 simdjson）、Web Worker 避免阻塞主线程。",{"type":20,"tag":34,"props":648,"children":649},{"id":57},[650],{"type":26,"value":57},{"type":20,"tag":61,"props":652,"children":654},{"className":63,"code":653,"language":65,"meta":7,"style":7},"{\"big\": \"data...\"}\n",[655],{"type":20,"tag":68,"props":656,"children":657},{"__ignoreMap":7},[658],{"type":20,"tag":72,"props":659,"children":660},{"class":74,"line":75},[661,665,670,674,679],{"type":20,"tag":72,"props":662,"children":663},{"style":79},[664],{"type":26,"value":198},{"type":20,"tag":72,"props":666,"children":667},{"style":201},[668],{"type":26,"value":669},"\"big\"",{"type":20,"tag":72,"props":671,"children":672},{"style":79},[673],{"type":26,"value":219},{"type":20,"tag":72,"props":675,"children":676},{"style":222},[677],{"type":26,"value":678},"\"data...\"",{"type":20,"tag":72,"props":680,"children":681},{"style":79},[682],{"type":26,"value":683},"}\n",{"type":20,"tag":34,"props":685,"children":686},{"id":84},[687],{"type":26,"value":84},{"type":20,"tag":88,"props":689,"children":690},{},[691,699],{"type":20,"tag":92,"props":692,"children":693},{},[694],{"type":20,"tag":96,"props":695,"children":697},{"href":696},"/minify",[698],{"type":26,"value":696},{"type":20,"tag":92,"props":700,"children":701},{},[702],{"type":20,"tag":96,"props":703,"children":705},{"href":704},"/visualize",[706],{"type":26,"value":704},{"type":20,"tag":34,"props":708,"children":709},{"id":111},[710],{"type":26,"value":111},{"type":20,"tag":28,"props":712,"children":713},{},[714],{"type":26,"value":715},"大 JSON 解析与传输优化：压缩、流式解析、字段裁剪、二进制替代方案。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":120,"props":717,"children":718},{},[719],{"type":26,"value":124},{"title":7,"searchDepth":126,"depth":126,"links":721},[722,723,724,725,726],{"id":629,"depth":126,"text":629},{"id":639,"depth":126,"text":639},{"id":57,"depth":126,"text":57},{"id":84,"depth":126,"text":84},{"id":111,"depth":126,"text":111},"content:blog:json-performance.md","blog/json-performance.md","blog/json-performance",1787305467065]