Formatted JSON is not necessarily correct data
Indentation makes JSON easier to inspect when comparing settings or reading a service response. It cannot tell whether a price is accurate, a field is required or a measurement uses the right unit.
Syntax is the first check, not the final one
JSON uses double quotes for strings and property names. Comments and a comma after the final item are not part of its standard syntax.
After parsing succeeds, check the data contract: required fields, types, units and permitted values. A text-valued quantity can be valid JSON yet invalid for a service expecting a number.
References: RFC 8259 — JSON syntax and interoperability
Whitespace inside a string is data
Spacing around structural punctuation can change without changing the structure. Spaces inside quotation marks belong to the value; minification is not permission to remove every space.
ToolRoof preserves the original number and string notation. Formatting does not turn the identifier "0042" into the number 42 or rewrite 1e3 merely to make it look different.
References: RFC 8259 — JSON syntax and interoperability
Duplicate keys deserve a separate decision
The JSON standard recommends unique property names within an object because software handles duplicates inconsistently. A successful format does not establish which value the author intended.
Resolve duplicated fields according to the source contract rather than assuming the final one always wins. Likewise, preserving a large number here cannot guarantee another system will read it with the same precision.
References: RFC 8259 — JSON syntax and interoperability
Example: a box with a code, not a number to calculate
In {"item":"box blue","quantity":2,"amount":1e3,"code":"0042"}, the item has two spaces, the quantity is numeric, the amount uses exponent notation, and the code is text with two leading zeros. Pretty printing should not erase these differences.
Minifying keeps both spaces in box blue, the notation 1e3, and the string "0042". A different object, {"count":2,"count":3}, needs a decision at the data source: a prettier layout cannot determine the intended count.