Worked examples
Formatting changes whitespace, not the JSON data model. Invalid JSON is rejected rather than silently repaired. Keep large numeric identifiers in quotes if every digit must be preserved.
| Example | Input / settings | Expected result |
|---|---|---|
| Valid JSON formatting | |
|
| Trailing comma error | |
Rejected: remove the trailing comma before formatting. |
Rules and limits
Strict JSON requires double-quoted keys and does not allow comments or trailing commas. JavaScript numbers can round large integers; keep exact identifiers as strings. Formatting preserves values within these numeric limits, not the original whitespace or key order.