[{"data":1,"prerenderedAt":692},["ShallowReactive",2],{"post-/blog/json-parse-error":3,"related-/blog/json-parse-error":179},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"keywords":12,"body":16,"_type":173,"_id":174,"_source":175,"_file":176,"_stem":177,"_extension":178},"/blog/json-parse-error","blog",false,"","JSON 解析错误排查指南","JSON.parse 报错时如何定位：看错误位置、检查行列、用校验工具。","2026-08-19","错误调试",[13,14,15],"json解析错误","json parse error","unexpected token",{"type":17,"children":18,"toc":165},"root",[19,27,33,39,44,49,54,59,122,127,149,154,159],{"type":20,"tag":21,"props":22,"children":24},"element","h1",{"id":23},"json-解析错误排查指南",[25],{"type":26,"value":8},"text",{"type":20,"tag":28,"props":29,"children":30},"p",{},[31],{"type":26,"value":32},"JSON.parse 抛错时需快速定位，本文给出排查步骤。",{"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},"看错误信息中的位置、用校验工具标红行列、检查该处字符与上下文。",{"type":20,"tag":34,"props":45,"children":47},{"id":46},"常见原因",[48],{"type":26,"value":46},{"type":20,"tag":28,"props":50,"children":51},{},[52],{"type":26,"value":53},"非法字符、未转义引号、括号不匹配、混入 BOM 或非 JSON 内容。",{"type":20,"tag":34,"props":55,"children":57},{"id":56},"代码示例",[58],{"type":26,"value":56},{"type":20,"tag":60,"props":61,"children":65},"pre",{"className":62,"code":63,"language":64,"meta":7,"style":7},"language-json shiki shiki-themes github-dark","{\"a\": 1, \"b\": 2,}\n","json",[66],{"type":20,"tag":67,"props":68,"children":69},"code",{"__ignoreMap":7},[70],{"type":20,"tag":71,"props":72,"children":75},"span",{"class":73,"line":74},"line",1,[76,82,88,93,98,103,108,112,117],{"type":20,"tag":71,"props":77,"children":79},{"style":78},"--shiki-default:#E1E4E8",[80],{"type":26,"value":81},"{",{"type":20,"tag":71,"props":83,"children":85},{"style":84},"--shiki-default:#79B8FF",[86],{"type":26,"value":87},"\"a\"",{"type":20,"tag":71,"props":89,"children":90},{"style":78},[91],{"type":26,"value":92},": ",{"type":20,"tag":71,"props":94,"children":95},{"style":84},[96],{"type":26,"value":97},"1",{"type":20,"tag":71,"props":99,"children":100},{"style":78},[101],{"type":26,"value":102},", ",{"type":20,"tag":71,"props":104,"children":105},{"style":84},[106],{"type":26,"value":107},"\"b\"",{"type":20,"tag":71,"props":109,"children":110},{"style":78},[111],{"type":26,"value":92},{"type":20,"tag":71,"props":113,"children":114},{"style":84},[115],{"type":26,"value":116},"2",{"type":20,"tag":71,"props":118,"children":119},{"style":78},[120],{"type":26,"value":121},",}\n",{"type":20,"tag":34,"props":123,"children":125},{"id":124},"推荐在线工具",[126],{"type":26,"value":124},{"type":20,"tag":128,"props":129,"children":130},"ul",{},[131,141],{"type":20,"tag":132,"props":133,"children":134},"li",{},[135],{"type":20,"tag":136,"props":137,"children":139},"a",{"href":138},"/validate",[140],{"type":26,"value":138},{"type":20,"tag":132,"props":142,"children":143},{},[144],{"type":20,"tag":136,"props":145,"children":147},{"href":146},"/format",[148],{"type":26,"value":146},{"type":20,"tag":34,"props":150,"children":152},{"id":151},"小结",[153],{"type":26,"value":151},{"type":20,"tag":28,"props":155,"children":156},{},[157],{"type":26,"value":158},"JSON.parse 报错时如何定位：看错误位置、检查行列、用校验工具。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":160,"props":161,"children":162},"style",{},[163],{"type":26,"value":164},"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":166,"depth":166,"links":167},2,[168,169,170,171,172],{"id":36,"depth":166,"text":36},{"id":46,"depth":166,"text":46},{"id":56,"depth":166,"text":56},{"id":124,"depth":166,"text":124},{"id":151,"depth":166,"text":151},"markdown","content:blog:json-parse-error.md","content","blog/json-parse-error.md","blog/json-parse-error","md",[180,301,423,571],{"_path":181,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":182,"description":183,"date":10,"category":11,"keywords":184,"body":188,"_type":173,"_id":298,"_source":175,"_file":299,"_stem":300,"_extension":178},"/blog/common-json-errors","常见 JSON 错误及解决方法","汇总 JSON 高频错误：单引号、尾逗号、缺引号、编码问题，附修复建议。",[185,186,187],"json错误","json报错","json修复",{"type":17,"children":189,"toc":291},[190,195,200,205,210,215,220,224,257,261,278,282,287],{"type":20,"tag":21,"props":191,"children":193},{"id":192},"常见-json-错误及解决方法",[194],{"type":26,"value":182},{"type":20,"tag":28,"props":196,"children":197},{},[198],{"type":26,"value":199},"使用 JSON 时会遇到多种高频错误，本文汇总原因与修复方法。",{"type":20,"tag":34,"props":201,"children":203},{"id":202},"语法错误",[204],{"type":26,"value":202},{"type":20,"tag":28,"props":206,"children":207},{},[208],{"type":26,"value":209},"单引号改双引号、删除尾逗号、补全引号与逗号、检查括号匹配。",{"type":20,"tag":34,"props":211,"children":213},{"id":212},"解析错误",[214],{"type":26,"value":212},{"type":20,"tag":28,"props":216,"children":217},{},[218],{"type":26,"value":219},"Unexpected token 多为非法字符，Unexpected end 多为括号未闭合。",{"type":20,"tag":34,"props":221,"children":222},{"id":56},[223],{"type":26,"value":56},{"type":20,"tag":60,"props":225,"children":227},{"className":62,"code":226,"language":64,"meta":7,"style":7},"{'key': 'value',}\n",[228],{"type":20,"tag":67,"props":229,"children":230},{"__ignoreMap":7},[231],{"type":20,"tag":71,"props":232,"children":233},{"class":73,"line":74},[234,238,244,248,253],{"type":20,"tag":71,"props":235,"children":236},{"style":78},[237],{"type":26,"value":81},{"type":20,"tag":71,"props":239,"children":241},{"style":240},"--shiki-default:#FDAEB7;--shiki-default-font-style:italic",[242],{"type":26,"value":243},"'key'",{"type":20,"tag":71,"props":245,"children":246},{"style":78},[247],{"type":26,"value":92},{"type":20,"tag":71,"props":249,"children":250},{"style":240},[251],{"type":26,"value":252},"'value'",{"type":20,"tag":71,"props":254,"children":255},{"style":78},[256],{"type":26,"value":121},{"type":20,"tag":34,"props":258,"children":259},{"id":124},[260],{"type":26,"value":124},{"type":20,"tag":128,"props":262,"children":263},{},[264,271],{"type":20,"tag":132,"props":265,"children":266},{},[267],{"type":20,"tag":136,"props":268,"children":269},{"href":138},[270],{"type":26,"value":138},{"type":20,"tag":132,"props":272,"children":273},{},[274],{"type":20,"tag":136,"props":275,"children":276},{"href":146},[277],{"type":26,"value":146},{"type":20,"tag":34,"props":279,"children":280},{"id":151},[281],{"type":26,"value":151},{"type":20,"tag":28,"props":283,"children":284},{},[285],{"type":26,"value":286},"汇总 JSON 高频错误：单引号、尾逗号、缺引号、编码问题，附修复建议。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":160,"props":288,"children":289},{},[290],{"type":26,"value":164},{"title":7,"searchDepth":166,"depth":166,"links":292},[293,294,295,296,297],{"id":202,"depth":166,"text":202},{"id":212,"depth":166,"text":212},{"id":56,"depth":166,"text":56},{"id":124,"depth":166,"text":124},{"id":151,"depth":166,"text":151},"content:blog:common-json-errors.md","blog/common-json-errors.md","blog/common-json-errors",{"_path":302,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":303,"description":304,"date":10,"category":11,"keywords":305,"body":309,"_type":173,"_id":420,"_source":175,"_file":421,"_stem":422,"_extension":178},"/blog/json-deep-dive","JSON 深度解析：从语法到生态","全面回顾 JSON：语法、类型、生态、工具、最佳实践，一文打通 JSON 知识体系。",[306,307,308],"json深度","json总结","json知识体系",{"type":17,"children":310,"toc":413},[311,316,321,326,331,336,341,345,379,383,400,404,409],{"type":20,"tag":21,"props":312,"children":314},{"id":313},"json-深度解析从语法到生态",[315],{"type":26,"value":303},{"type":20,"tag":28,"props":317,"children":318},{},[319],{"type":26,"value":320},"本文全面梳理 JSON 从语法、类型到生态工具的知识体系，助你打通 JSON。",{"type":20,"tag":34,"props":322,"children":324},{"id":323},"知识脉络",[325],{"type":26,"value":323},{"type":20,"tag":28,"props":327,"children":328},{},[329],{"type":26,"value":330},"语法规则→六种类型→嵌套结构→序列化→校验→转换→代码生成→生态工具。",{"type":20,"tag":34,"props":332,"children":334},{"id":333},"工具推荐",[335],{"type":26,"value":333},{"type":20,"tag":28,"props":337,"children":338},{},[339],{"type":26,"value":340},"JSONDog 提供格式化、校验、转换、代码生成、可视化等全套 JSON 工具，纯前端零上传。",{"type":20,"tag":34,"props":342,"children":343},{"id":56},[344],{"type":26,"value":56},{"type":20,"tag":60,"props":346,"children":348},{"className":62,"code":347,"language":64,"meta":7,"style":7},"{\"summary\": \"JSON 知识体系\"}\n",[349],{"type":20,"tag":67,"props":350,"children":351},{"__ignoreMap":7},[352],{"type":20,"tag":71,"props":353,"children":354},{"class":73,"line":74},[355,359,364,368,374],{"type":20,"tag":71,"props":356,"children":357},{"style":78},[358],{"type":26,"value":81},{"type":20,"tag":71,"props":360,"children":361},{"style":84},[362],{"type":26,"value":363},"\"summary\"",{"type":20,"tag":71,"props":365,"children":366},{"style":78},[367],{"type":26,"value":92},{"type":20,"tag":71,"props":369,"children":371},{"style":370},"--shiki-default:#9ECBFF",[372],{"type":26,"value":373},"\"JSON 知识体系\"",{"type":20,"tag":71,"props":375,"children":376},{"style":78},[377],{"type":26,"value":378},"}\n",{"type":20,"tag":34,"props":380,"children":381},{"id":124},[382],{"type":26,"value":124},{"type":20,"tag":128,"props":384,"children":385},{},[386,393],{"type":20,"tag":132,"props":387,"children":388},{},[389],{"type":20,"tag":136,"props":390,"children":391},{"href":146},[392],{"type":26,"value":146},{"type":20,"tag":132,"props":394,"children":395},{},[396],{"type":20,"tag":136,"props":397,"children":398},{"href":138},[399],{"type":26,"value":138},{"type":20,"tag":34,"props":401,"children":402},{"id":151},[403],{"type":26,"value":151},{"type":20,"tag":28,"props":405,"children":406},{},[407],{"type":26,"value":408},"全面回顾 JSON：语法、类型、生态、工具、最佳实践，一文打通 JSON 知识体系。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":160,"props":410,"children":411},{},[412],{"type":26,"value":164},{"title":7,"searchDepth":166,"depth":166,"links":414},[415,416,417,418,419],{"id":323,"depth":166,"text":323},{"id":333,"depth":166,"text":333},{"id":56,"depth":166,"text":56},{"id":124,"depth":166,"text":124},{"id":151,"depth":166,"text":151},"content:blog:json-deep-dive.md","blog/json-deep-dive.md","blog/json-deep-dive",{"_path":424,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":425,"description":426,"date":10,"category":11,"keywords":427,"body":431,"_type":173,"_id":568,"_source":175,"_file":569,"_stem":570,"_extension":178},"/blog/json-encoding-issues","JSON 编码问题：中文与 Unicode","JSON 中文与 Unicode 编码问题：\\u 转义、UTF-8 BOM、乱码排查。",[428,429,430],"json编码","json中文","json unicode",{"type":17,"children":432,"toc":561},[433,438,443,448,453,458,463,467,526,530,548,552,557],{"type":20,"tag":21,"props":434,"children":436},{"id":435},"json-编码问题中文与-unicode",[437],{"type":26,"value":425},{"type":20,"tag":28,"props":439,"children":440},{},[441],{"type":26,"value":442},"JSON 涉及中文与 Unicode 时易出现编码问题，需正确处理。",{"type":20,"tag":34,"props":444,"children":446},{"id":445},"中文处理",[447],{"type":26,"value":445},{"type":20,"tag":28,"props":449,"children":450},{},[451],{"type":26,"value":452},"JSON 允许直接写中文（UTF-8），也可能被转义为 \\uXXXX，两者等价。",{"type":20,"tag":34,"props":454,"children":456},{"id":455},"乱码排查",[457],{"type":26,"value":455},{"type":20,"tag":28,"props":459,"children":460},{},[461],{"type":26,"value":462},"检查文件编码是否 UTF-8、有无 BOM、Content-Type 是否声明 charset。",{"type":20,"tag":34,"props":464,"children":465},{"id":56},[466],{"type":26,"value":56},{"type":20,"tag":60,"props":468,"children":470},{"className":62,"code":469,"language":64,"meta":7,"style":7},"{\"name\": \"中文\", \"emoji\": \"\\u4e2d\"}\n",[471],{"type":20,"tag":67,"props":472,"children":473},{"__ignoreMap":7},[474],{"type":20,"tag":71,"props":475,"children":476},{"class":73,"line":74},[477,481,486,490,495,499,504,508,513,518,522],{"type":20,"tag":71,"props":478,"children":479},{"style":78},[480],{"type":26,"value":81},{"type":20,"tag":71,"props":482,"children":483},{"style":84},[484],{"type":26,"value":485},"\"name\"",{"type":20,"tag":71,"props":487,"children":488},{"style":78},[489],{"type":26,"value":92},{"type":20,"tag":71,"props":491,"children":492},{"style":370},[493],{"type":26,"value":494},"\"中文\"",{"type":20,"tag":71,"props":496,"children":497},{"style":78},[498],{"type":26,"value":102},{"type":20,"tag":71,"props":500,"children":501},{"style":84},[502],{"type":26,"value":503},"\"emoji\"",{"type":20,"tag":71,"props":505,"children":506},{"style":78},[507],{"type":26,"value":92},{"type":20,"tag":71,"props":509,"children":510},{"style":370},[511],{"type":26,"value":512},"\"",{"type":20,"tag":71,"props":514,"children":515},{"style":84},[516],{"type":26,"value":517},"\\u4e2d",{"type":20,"tag":71,"props":519,"children":520},{"style":370},[521],{"type":26,"value":512},{"type":20,"tag":71,"props":523,"children":524},{"style":78},[525],{"type":26,"value":378},{"type":20,"tag":34,"props":527,"children":528},{"id":124},[529],{"type":26,"value":124},{"type":20,"tag":128,"props":531,"children":532},{},[533,541],{"type":20,"tag":132,"props":534,"children":535},{},[536],{"type":20,"tag":136,"props":537,"children":539},{"href":538},"/encode",[540],{"type":26,"value":538},{"type":20,"tag":132,"props":542,"children":543},{},[544],{"type":20,"tag":136,"props":545,"children":546},{"href":146},[547],{"type":26,"value":146},{"type":20,"tag":34,"props":549,"children":550},{"id":151},[551],{"type":26,"value":151},{"type":20,"tag":28,"props":553,"children":554},{},[555],{"type":26,"value":556},"JSON 中文与 Unicode 编码问题：\\u 转义、UTF-8 BOM、乱码排查。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":160,"props":558,"children":559},{},[560],{"type":26,"value":164},{"title":7,"searchDepth":166,"depth":166,"links":562},[563,564,565,566,567],{"id":445,"depth":166,"text":445},{"id":455,"depth":166,"text":455},{"id":56,"depth":166,"text":56},{"id":124,"depth":166,"text":124},{"id":151,"depth":166,"text":151},"content:blog:json-encoding-issues.md","blog/json-encoding-issues.md","blog/json-encoding-issues",{"_path":572,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":573,"description":574,"date":10,"category":11,"keywords":575,"body":579,"_type":173,"_id":689,"_source":175,"_file":690,"_stem":691,"_extension":178},"/blog/large-json-files","大 JSON 文件处理技巧","处理大 JSON 文件：流式解析、分块、Web Worker、压缩，避免内存溢出。",[576,577,578],"大json","json大文件","json流式",{"type":17,"children":580,"toc":682},[581,586,591,596,601,606,611,615,647,651,669,673,678],{"type":20,"tag":21,"props":582,"children":584},{"id":583},"大-json-文件处理技巧",[585],{"type":26,"value":573},{"type":20,"tag":28,"props":587,"children":588},{},[589],{"type":26,"value":590},"处理数十 MB 以上的 JSON 文件需特殊技巧，避免内存溢出与界面卡顿。",{"type":20,"tag":34,"props":592,"children":594},{"id":593},"处理策略",[595],{"type":26,"value":593},{"type":20,"tag":28,"props":597,"children":598},{},[599],{"type":26,"value":600},"流式解析（SAX/NDJSON）、分块加载、Web Worker 后台处理、gzip 压缩传输。",{"type":20,"tag":34,"props":602,"children":604},{"id":603},"工具建议",[605],{"type":26,"value":603},{"type":20,"tag":28,"props":607,"children":608},{},[609],{"type":26,"value":610},"JSONDog 工具用 Web Worker 处理大文件，不阻塞界面。",{"type":20,"tag":34,"props":612,"children":613},{"id":56},[614],{"type":26,"value":56},{"type":20,"tag":60,"props":616,"children":618},{"className":62,"code":617,"language":64,"meta":7,"style":7},"{\"large\": \"...\"}\n",[619],{"type":20,"tag":67,"props":620,"children":621},{"__ignoreMap":7},[622],{"type":20,"tag":71,"props":623,"children":624},{"class":73,"line":74},[625,629,634,638,643],{"type":20,"tag":71,"props":626,"children":627},{"style":78},[628],{"type":26,"value":81},{"type":20,"tag":71,"props":630,"children":631},{"style":84},[632],{"type":26,"value":633},"\"large\"",{"type":20,"tag":71,"props":635,"children":636},{"style":78},[637],{"type":26,"value":92},{"type":20,"tag":71,"props":639,"children":640},{"style":370},[641],{"type":26,"value":642},"\"...\"",{"type":20,"tag":71,"props":644,"children":645},{"style":78},[646],{"type":26,"value":378},{"type":20,"tag":34,"props":648,"children":649},{"id":124},[650],{"type":26,"value":124},{"type":20,"tag":128,"props":652,"children":653},{},[654,662],{"type":20,"tag":132,"props":655,"children":656},{},[657],{"type":20,"tag":136,"props":658,"children":660},{"href":659},"/visualize",[661],{"type":26,"value":659},{"type":20,"tag":132,"props":663,"children":664},{},[665],{"type":20,"tag":136,"props":666,"children":667},{"href":146},[668],{"type":26,"value":146},{"type":20,"tag":34,"props":670,"children":671},{"id":151},[672],{"type":26,"value":151},{"type":20,"tag":28,"props":674,"children":675},{},[676],{"type":26,"value":677},"处理大 JSON 文件：流式解析、分块、Web Worker、压缩，避免内存溢出。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":160,"props":679,"children":680},{},[681],{"type":26,"value":164},{"title":7,"searchDepth":166,"depth":166,"links":683},[684,685,686,687,688],{"id":593,"depth":166,"text":593},{"id":603,"depth":166,"text":603},{"id":56,"depth":166,"text":56},{"id":124,"depth":166,"text":124},{"id":151,"depth":166,"text":151},"content:blog:large-json-files.md","blog/large-json-files.md","blog/large-json-files",1787305466969]