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