[{"data":1,"prerenderedAt":807},["ShallowReactive",2],{"post-/blog/json-editor-online":3,"related-/blog/json-editor-online":197},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"category":11,"keywords":12,"body":16,"_type":191,"_id":192,"_source":193,"_file":194,"_stem":195,"_extension":196},"/blog/json-editor-online","blog",false,"","在线 JSON 编辑器推荐","在线 JSON 编辑器提供语法高亮、实时校验、行号，无需安装即可编辑 JSON。","2026-08-19","工具",[13,14,15],"json编辑器","json editor","在线编辑json",{"type":17,"children":18,"toc":184},"root",[19,27,33,39,44,49,54,59,141,146,168,173,178],{"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 编辑器让你在浏览器中直接编辑 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},"无需安装、跨设备可用、即时上手，适合临时编辑与快速校验。",{"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","{\n  \"name\": \"JSONDog\",\n  \"tools\": [\"editor\"]\n}\n","json",[66],{"type":20,"tag":67,"props":68,"children":69},"code",{"__ignoreMap":7},[70,82,108,132],{"type":20,"tag":71,"props":72,"children":75},"span",{"class":73,"line":74},"line",1,[76],{"type":20,"tag":71,"props":77,"children":79},{"style":78},"--shiki-default:#E1E4E8",[80],{"type":26,"value":81},"{\n",{"type":20,"tag":71,"props":83,"children":85},{"class":73,"line":84},2,[86,92,97,103],{"type":20,"tag":71,"props":87,"children":89},{"style":88},"--shiki-default:#79B8FF",[90],{"type":26,"value":91},"  \"name\"",{"type":20,"tag":71,"props":93,"children":94},{"style":78},[95],{"type":26,"value":96},": ",{"type":20,"tag":71,"props":98,"children":100},{"style":99},"--shiki-default:#9ECBFF",[101],{"type":26,"value":102},"\"JSONDog\"",{"type":20,"tag":71,"props":104,"children":105},{"style":78},[106],{"type":26,"value":107},",\n",{"type":20,"tag":71,"props":109,"children":111},{"class":73,"line":110},3,[112,117,122,127],{"type":20,"tag":71,"props":113,"children":114},{"style":88},[115],{"type":26,"value":116},"  \"tools\"",{"type":20,"tag":71,"props":118,"children":119},{"style":78},[120],{"type":26,"value":121},": [",{"type":20,"tag":71,"props":123,"children":124},{"style":99},[125],{"type":26,"value":126},"\"editor\"",{"type":20,"tag":71,"props":128,"children":129},{"style":78},[130],{"type":26,"value":131},"]\n",{"type":20,"tag":71,"props":133,"children":135},{"class":73,"line":134},4,[136],{"type":20,"tag":71,"props":137,"children":138},{"style":78},[139],{"type":26,"value":140},"}\n",{"type":20,"tag":34,"props":142,"children":144},{"id":143},"推荐在线工具",[145],{"type":26,"value":143},{"type":20,"tag":147,"props":148,"children":149},"ul",{},[150,160],{"type":20,"tag":151,"props":152,"children":153},"li",{},[154],{"type":20,"tag":155,"props":156,"children":158},"a",{"href":157},"/editor",[159],{"type":26,"value":157},{"type":20,"tag":151,"props":161,"children":162},{},[163],{"type":20,"tag":155,"props":164,"children":166},{"href":165},"/format",[167],{"type":26,"value":165},{"type":20,"tag":34,"props":169,"children":171},{"id":170},"小结",[172],{"type":26,"value":170},{"type":20,"tag":28,"props":174,"children":175},{},[176],{"type":26,"value":177},"在线 JSON 编辑器提供语法高亮、实时校验、行号，无需安装即可编辑 JSON。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":179,"props":180,"children":181},"style",{},[182],{"type":26,"value":183},"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":84,"depth":84,"links":185},[186,187,188,189,190],{"id":36,"depth":84,"text":36},{"id":46,"depth":84,"text":46},{"id":56,"depth":84,"text":56},{"id":143,"depth":84,"text":143},{"id":170,"depth":84,"text":170},"markdown","content:blog:json-editor-online.md","content","blog/json-editor-online.md","blog/json-editor-online","md",[198,351,522,639],{"_path":199,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":200,"description":201,"date":10,"category":11,"keywords":202,"body":206,"_type":191,"_id":348,"_source":193,"_file":349,"_stem":350,"_extension":196},"/blog/how-to-format-json","如何格式化 JSON：美化与缩进","JSON 格式化（美化）是为 JSON 添加缩进与换行，提升可读性。本文介绍在线格式化方法。",[203,204,205],"json格式化","json美化","format json",{"type":17,"children":207,"toc":341},[208,213,218,223,228,233,238,242,306,310,328,332,337],{"type":20,"tag":21,"props":209,"children":211},{"id":210},"如何格式化-json美化与缩进",[212],{"type":26,"value":200},{"type":20,"tag":28,"props":214,"children":215},{},[216],{"type":26,"value":217},"JSON 格式化又称美化（beautify）或 pretty print，指为压缩的 JSON 添加缩进与换行，使其结构清晰易读。",{"type":20,"tag":34,"props":219,"children":221},{"id":220},"为什么格式化",[222],{"type":26,"value":220},{"type":20,"tag":28,"props":224,"children":225},{},[226],{"type":26,"value":227},"压缩 JSON 单行难读，格式化后层级清晰，便于调试与排查错误。",{"type":20,"tag":34,"props":229,"children":231},{"id":230},"如何操作",[232],{"type":26,"value":230},{"type":20,"tag":28,"props":234,"children":235},{},[236],{"type":26,"value":237},"粘贴 JSON 到格式化工具，选择缩进（2/4 空格或 Tab），一键生成美化结果。",{"type":20,"tag":34,"props":239,"children":240},{"id":56},[241],{"type":26,"value":56},{"type":20,"tag":60,"props":243,"children":245},{"className":62,"code":244,"language":64,"meta":7,"style":7},"{\"a\":1,\"b\":{\"c\":2}}\n",[246],{"type":20,"tag":67,"props":247,"children":248},{"__ignoreMap":7},[249],{"type":20,"tag":71,"props":250,"children":251},{"class":73,"line":74},[252,257,262,267,272,277,282,287,292,296,301],{"type":20,"tag":71,"props":253,"children":254},{"style":78},[255],{"type":26,"value":256},"{",{"type":20,"tag":71,"props":258,"children":259},{"style":88},[260],{"type":26,"value":261},"\"a\"",{"type":20,"tag":71,"props":263,"children":264},{"style":78},[265],{"type":26,"value":266},":",{"type":20,"tag":71,"props":268,"children":269},{"style":88},[270],{"type":26,"value":271},"1",{"type":20,"tag":71,"props":273,"children":274},{"style":78},[275],{"type":26,"value":276},",",{"type":20,"tag":71,"props":278,"children":279},{"style":88},[280],{"type":26,"value":281},"\"b\"",{"type":20,"tag":71,"props":283,"children":284},{"style":78},[285],{"type":26,"value":286},":{",{"type":20,"tag":71,"props":288,"children":289},{"style":88},[290],{"type":26,"value":291},"\"c\"",{"type":20,"tag":71,"props":293,"children":294},{"style":78},[295],{"type":26,"value":266},{"type":20,"tag":71,"props":297,"children":298},{"style":88},[299],{"type":26,"value":300},"2",{"type":20,"tag":71,"props":302,"children":303},{"style":78},[304],{"type":26,"value":305},"}}\n",{"type":20,"tag":34,"props":307,"children":308},{"id":143},[309],{"type":26,"value":143},{"type":20,"tag":147,"props":311,"children":312},{},[313,320],{"type":20,"tag":151,"props":314,"children":315},{},[316],{"type":20,"tag":155,"props":317,"children":318},{"href":165},[319],{"type":26,"value":165},{"type":20,"tag":151,"props":321,"children":322},{},[323],{"type":20,"tag":155,"props":324,"children":326},{"href":325},"/minify",[327],{"type":26,"value":325},{"type":20,"tag":34,"props":329,"children":330},{"id":170},[331],{"type":26,"value":170},{"type":20,"tag":28,"props":333,"children":334},{},[335],{"type":26,"value":336},"JSON 格式化（美化）是为 JSON 添加缩进与换行，提升可读性。本文介绍在线格式化方法。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":179,"props":338,"children":339},{},[340],{"type":26,"value":183},{"title":7,"searchDepth":84,"depth":84,"links":342},[343,344,345,346,347],{"id":220,"depth":84,"text":220},{"id":230,"depth":84,"text":230},{"id":56,"depth":84,"text":56},{"id":143,"depth":84,"text":143},{"id":170,"depth":84,"text":170},"content:blog:how-to-format-json.md","blog/how-to-format-json.md","blog/how-to-format-json",{"_path":352,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":353,"description":354,"date":10,"category":11,"keywords":355,"body":359,"_type":191,"_id":519,"_source":193,"_file":520,"_stem":521,"_extension":196},"/blog/how-to-minify-json","如何压缩 JSON：Minify","JSON 压缩去除所有空白与换行，减小体积，用于生产环境传输。",[356,357,358],"json压缩","json minify","compress json",{"type":17,"children":360,"toc":512},[361,366,371,376,381,386,391,395,478,482,499,503,508],{"type":20,"tag":21,"props":362,"children":364},{"id":363},"如何压缩-jsonminify",[365],{"type":26,"value":353},{"type":20,"tag":28,"props":367,"children":368},{},[369],{"type":26,"value":370},"JSON 压缩（minify）去除所有不必要的空白、换行与缩进，将 JSON 压成单行，减小传输体积。",{"type":20,"tag":34,"props":372,"children":374},{"id":373},"压缩好处",[375],{"type":26,"value":373},{"type":20,"tag":28,"props":377,"children":378},{},[379],{"type":26,"value":380},"减小文件体积，加快网络传输，节省存储空间，适合生产环境。",{"type":20,"tag":34,"props":382,"children":384},{"id":383},"开发建议",[385],{"type":26,"value":383},{"type":20,"tag":28,"props":387,"children":388},{},[389],{"type":26,"value":390},"开发时用格式化便于阅读，部署时用压缩优化性能。",{"type":20,"tag":34,"props":392,"children":393},{"id":56},[394],{"type":26,"value":56},{"type":20,"tag":60,"props":396,"children":398},{"className":62,"code":397,"language":64,"meta":7,"style":7},"{\"a\":1,\"b\":[2,3],\"c\":{\"d\":4}}\n",[399],{"type":20,"tag":67,"props":400,"children":401},{"__ignoreMap":7},[402],{"type":20,"tag":71,"props":403,"children":404},{"class":73,"line":74},[405,409,413,417,421,425,429,434,438,442,447,452,456,460,465,469,474],{"type":20,"tag":71,"props":406,"children":407},{"style":78},[408],{"type":26,"value":256},{"type":20,"tag":71,"props":410,"children":411},{"style":88},[412],{"type":26,"value":261},{"type":20,"tag":71,"props":414,"children":415},{"style":78},[416],{"type":26,"value":266},{"type":20,"tag":71,"props":418,"children":419},{"style":88},[420],{"type":26,"value":271},{"type":20,"tag":71,"props":422,"children":423},{"style":78},[424],{"type":26,"value":276},{"type":20,"tag":71,"props":426,"children":427},{"style":88},[428],{"type":26,"value":281},{"type":20,"tag":71,"props":430,"children":431},{"style":78},[432],{"type":26,"value":433},":[",{"type":20,"tag":71,"props":435,"children":436},{"style":88},[437],{"type":26,"value":300},{"type":20,"tag":71,"props":439,"children":440},{"style":78},[441],{"type":26,"value":276},{"type":20,"tag":71,"props":443,"children":444},{"style":88},[445],{"type":26,"value":446},"3",{"type":20,"tag":71,"props":448,"children":449},{"style":78},[450],{"type":26,"value":451},"],",{"type":20,"tag":71,"props":453,"children":454},{"style":88},[455],{"type":26,"value":291},{"type":20,"tag":71,"props":457,"children":458},{"style":78},[459],{"type":26,"value":286},{"type":20,"tag":71,"props":461,"children":462},{"style":88},[463],{"type":26,"value":464},"\"d\"",{"type":20,"tag":71,"props":466,"children":467},{"style":78},[468],{"type":26,"value":266},{"type":20,"tag":71,"props":470,"children":471},{"style":88},[472],{"type":26,"value":473},"4",{"type":20,"tag":71,"props":475,"children":476},{"style":78},[477],{"type":26,"value":305},{"type":20,"tag":34,"props":479,"children":480},{"id":143},[481],{"type":26,"value":143},{"type":20,"tag":147,"props":483,"children":484},{},[485,492],{"type":20,"tag":151,"props":486,"children":487},{},[488],{"type":20,"tag":155,"props":489,"children":490},{"href":325},[491],{"type":26,"value":325},{"type":20,"tag":151,"props":493,"children":494},{},[495],{"type":20,"tag":155,"props":496,"children":497},{"href":165},[498],{"type":26,"value":165},{"type":20,"tag":34,"props":500,"children":501},{"id":170},[502],{"type":26,"value":170},{"type":20,"tag":28,"props":504,"children":505},{},[506],{"type":26,"value":507},"JSON 压缩去除所有空白与换行，减小体积，用于生产环境传输。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":179,"props":509,"children":510},{},[511],{"type":26,"value":183},{"title":7,"searchDepth":84,"depth":84,"links":513},[514,515,516,517,518],{"id":373,"depth":84,"text":373},{"id":383,"depth":84,"text":383},{"id":56,"depth":84,"text":56},{"id":143,"depth":84,"text":143},{"id":170,"depth":84,"text":170},"content:blog:how-to-minify-json.md","blog/how-to-minify-json.md","blog/how-to-minify-json",{"_path":523,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":524,"description":525,"date":10,"category":11,"keywords":526,"body":530,"_type":191,"_id":636,"_source":193,"_file":637,"_stem":638,"_extension":196},"/blog/how-to-validate-json","如何校验 JSON 语法","JSON 校验检查语法是否合法，定位错误行号并给出修复建议。",[527,528,529],"json校验","json验证","validate json",{"type":17,"children":531,"toc":629},[532,537,542,547,552,557,562,566,594,598,616,620,625],{"type":20,"tag":21,"props":533,"children":535},{"id":534},"如何校验-json-语法",[536],{"type":26,"value":524},{"type":20,"tag":28,"props":538,"children":539},{},[540],{"type":26,"value":541},"JSON 校验用于检查 JSON 文本是否符合语法规范，发现错误并定位到具体行列。",{"type":20,"tag":34,"props":543,"children":545},{"id":544},"常见错误",[546],{"type":26,"value":544},{"type":20,"tag":28,"props":548,"children":549},{},[550],{"type":26,"value":551},"单引号、尾逗号、缺引号、缺逗号是高频错误，校验工具会指出位置与原因。",{"type":20,"tag":34,"props":553,"children":555},{"id":554},"校验工具",[556],{"type":26,"value":554},{"type":20,"tag":28,"props":558,"children":559},{},[560],{"type":26,"value":561},"粘贴 JSON 即时校验，合法显示美化预览，非法显示错误行号与修复建议。",{"type":20,"tag":34,"props":563,"children":564},{"id":56},[565],{"type":26,"value":56},{"type":20,"tag":60,"props":567,"children":569},{"className":62,"code":568,"language":64,"meta":7,"style":7},"{\"bad\": \"missing quote}\n",[570],{"type":20,"tag":67,"props":571,"children":572},{"__ignoreMap":7},[573],{"type":20,"tag":71,"props":574,"children":575},{"class":73,"line":74},[576,580,585,589],{"type":20,"tag":71,"props":577,"children":578},{"style":78},[579],{"type":26,"value":256},{"type":20,"tag":71,"props":581,"children":582},{"style":88},[583],{"type":26,"value":584},"\"bad\"",{"type":20,"tag":71,"props":586,"children":587},{"style":78},[588],{"type":26,"value":96},{"type":20,"tag":71,"props":590,"children":591},{"style":99},[592],{"type":26,"value":593},"\"missing quote}\n",{"type":20,"tag":34,"props":595,"children":596},{"id":143},[597],{"type":26,"value":143},{"type":20,"tag":147,"props":599,"children":600},{},[601,609],{"type":20,"tag":151,"props":602,"children":603},{},[604],{"type":20,"tag":155,"props":605,"children":607},{"href":606},"/validate",[608],{"type":26,"value":606},{"type":20,"tag":151,"props":610,"children":611},{},[612],{"type":20,"tag":155,"props":613,"children":614},{"href":165},[615],{"type":26,"value":165},{"type":20,"tag":34,"props":617,"children":618},{"id":170},[619],{"type":26,"value":170},{"type":20,"tag":28,"props":621,"children":622},{},[623],{"type":26,"value":624},"JSON 校验检查语法是否合法，定位错误行号并给出修复建议。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":179,"props":626,"children":627},{},[628],{"type":26,"value":183},{"title":7,"searchDepth":84,"depth":84,"links":630},[631,632,633,634,635],{"id":544,"depth":84,"text":544},{"id":554,"depth":84,"text":554},{"id":56,"depth":84,"text":56},{"id":143,"depth":84,"text":143},{"id":170,"depth":84,"text":170},"content:blog:how-to-validate-json.md","blog/how-to-validate-json.md","blog/how-to-validate-json",{"_path":640,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":641,"description":642,"date":10,"category":11,"keywords":643,"body":647,"_type":191,"_id":804,"_source":193,"_file":805,"_stem":806,"_extension":196},"/blog/json-diff-compare","JSON 对比与差异分析","JSON 对比工具递归比较两段 JSON，输出新增、删除、修改的节点路径。",[644,645,646],"json对比","json diff","json compare",{"type":17,"children":648,"toc":797},[649,654,659,664,669,674,679,683,762,766,784,788,793],{"type":20,"tag":21,"props":650,"children":652},{"id":651},"json-对比与差异分析",[653],{"type":26,"value":641},{"type":20,"tag":28,"props":655,"children":656},{},[657],{"type":26,"value":658},"JSON 对比工具递归比较两段 JSON 的差异，输出每个新增、删除、修改节点的路径，便于排查变更。",{"type":20,"tag":34,"props":660,"children":662},{"id":661},"对比规则",[663],{"type":26,"value":661},{"type":20,"tag":28,"props":665,"children":666},{},[667],{"type":26,"value":668},"对象按键名比较不区分顺序，数组按索引比较，基本值按相等比较。",{"type":20,"tag":34,"props":670,"children":672},{"id":671},"使用场景",[673],{"type":26,"value":671},{"type":20,"tag":28,"props":675,"children":676},{},[677],{"type":26,"value":678},"对比 API 两次返回、排查配置变更、版本差异分析。",{"type":20,"tag":34,"props":680,"children":681},{"id":56},[682],{"type":26,"value":56},{"type":20,"tag":60,"props":684,"children":686},{"className":62,"code":685,"language":64,"meta":7,"style":7},"{\"a\":1,\"b\":2} vs {\"a\":1,\"c\":3}\n",[687],{"type":20,"tag":67,"props":688,"children":689},{"__ignoreMap":7},[690],{"type":20,"tag":71,"props":691,"children":692},{"class":73,"line":74},[693,697,701,705,709,713,717,721,725,730,734,738,742,746,750,754,758],{"type":20,"tag":71,"props":694,"children":695},{"style":78},[696],{"type":26,"value":256},{"type":20,"tag":71,"props":698,"children":699},{"style":88},[700],{"type":26,"value":261},{"type":20,"tag":71,"props":702,"children":703},{"style":78},[704],{"type":26,"value":266},{"type":20,"tag":71,"props":706,"children":707},{"style":88},[708],{"type":26,"value":271},{"type":20,"tag":71,"props":710,"children":711},{"style":78},[712],{"type":26,"value":276},{"type":20,"tag":71,"props":714,"children":715},{"style":88},[716],{"type":26,"value":281},{"type":20,"tag":71,"props":718,"children":719},{"style":78},[720],{"type":26,"value":266},{"type":20,"tag":71,"props":722,"children":723},{"style":88},[724],{"type":26,"value":300},{"type":20,"tag":71,"props":726,"children":727},{"style":78},[728],{"type":26,"value":729},"} vs {",{"type":20,"tag":71,"props":731,"children":732},{"style":88},[733],{"type":26,"value":261},{"type":20,"tag":71,"props":735,"children":736},{"style":78},[737],{"type":26,"value":266},{"type":20,"tag":71,"props":739,"children":740},{"style":88},[741],{"type":26,"value":271},{"type":20,"tag":71,"props":743,"children":744},{"style":78},[745],{"type":26,"value":276},{"type":20,"tag":71,"props":747,"children":748},{"style":88},[749],{"type":26,"value":291},{"type":20,"tag":71,"props":751,"children":752},{"style":78},[753],{"type":26,"value":266},{"type":20,"tag":71,"props":755,"children":756},{"style":88},[757],{"type":26,"value":446},{"type":20,"tag":71,"props":759,"children":760},{"style":78},[761],{"type":26,"value":140},{"type":20,"tag":34,"props":763,"children":764},{"id":143},[765],{"type":26,"value":143},{"type":20,"tag":147,"props":767,"children":768},{},[769,777],{"type":20,"tag":151,"props":770,"children":771},{},[772],{"type":20,"tag":155,"props":773,"children":775},{"href":774},"/diff",[776],{"type":26,"value":774},{"type":20,"tag":151,"props":778,"children":779},{},[780],{"type":20,"tag":155,"props":781,"children":782},{"href":165},[783],{"type":26,"value":165},{"type":20,"tag":34,"props":785,"children":786},{"id":170},[787],{"type":26,"value":170},{"type":20,"tag":28,"props":789,"children":790},{},[791],{"type":26,"value":792},"JSON 对比工具递归比较两段 JSON，输出新增、删除、修改的节点路径。 JSONDog 提供全套 JSON 在线工具，纯前端、零上传、中英双语，欢迎免费使用。",{"type":20,"tag":179,"props":794,"children":795},{},[796],{"type":26,"value":183},{"title":7,"searchDepth":84,"depth":84,"links":798},[799,800,801,802,803],{"id":661,"depth":84,"text":661},{"id":671,"depth":84,"text":671},{"id":56,"depth":84,"text":56},{"id":143,"depth":84,"text":143},{"id":170,"depth":84,"text":170},"content:blog:json-diff-compare.md","blog/json-diff-compare.md","blog/json-diff-compare",1787305466663]