JSON Formatter

Validate, format and minify JSON locally.

📐 工作原理与说明
JSON 格式化按语法树递归输出:解析器先做词法分析(识别字符串、数字、true/false/null 与括号),再按层级缩进(每层 2 空格或制表符);压缩即移除全部结构空白仅保留分隔符;校验失败时报出错误行列位置,字符串内转义序列须成对且不可跨行。

Formula & Standard References

ItemFormulaSource / Standard
JSON syntax { } [ ] string/number/bool/null ECMA-404 / RFC 8259
Indentation 2 spaces / 4 spaces / tab JSON.stringify(.,null,n)
Validation Parse failure returns error position RFC 8259 §8
📌 使用说明