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