JSON校验
检查JSON语法并定位错误。
格式化JSON,提高可读性。
详细方法和示例目前以英语提供。
JSON is parsed with the standard JSON parser, then serialized with two spaces, four spaces, tabs, or no added whitespace. Parsing rejects trailing commas, comments, and unquoted object keys. Very large numeric literals may lose precision under JavaScript number semantics.
The input {"a":1,"b":[2,3]} can be expanded into an indented object, or compacted back into one line without changing its JSON structure.
Inspect nested API responses, make configuration files easier to review, or create a compact JSON payload. Formatting changes presentation, while validation checks syntax; neither confirms that an API accepts the document structure.
They are not part of standard JSON syntax. Remove them or use the parser for the format you actually have, such as JSONC or a JavaScript object literal.
No. A syntactically valid document can still omit required fields or contain incorrect types. Check the API schema separately.