Worked example
Read an API response without changing a long identifier
Format the JSON below, which contains a large id value. This separates whitespace formatting from value conversion.
Example input
{"id":9007199254740993,"enabled":true}- Paste the JSON, choose two-space indentation and run validation and conversion.
- Check that the id still ends in 993 and enabled is still true.
- Convert again with minification to return to the original single-line JSON. Use the full-result download to save a copy.
What to check in the result
Only whitespace and line layout change; 9007199254740993 is not rounded. Syntax validation does not check the fields or business rules required by an API.
{
"id": 9007199254740993,
"enabled": true
}Troubleshooting
- Why do comments or a trailing comma fail validation?
- This tool accepts strict JSON. Remove comments and the comma after the final object or array item from a copy, then validate again. JavaScript object source and JSON have different syntax rules.
- Why can conversion succeed with a duplicate-key warning?
- The same key occurs more than once in one object. The tool does not delete entries or choose a winning value. Check the source, decide the intended keys and values, and validate again before using it in the destination application.