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