Formatting a compressed API response
An API returns {"status":"ok","items":[{"id":1,"name":"A"},{"id":2,"name":"B"}]}. The formatter produces one property per line with two-space indentation, making the nesting visible at a glance. The stats panel shows the input is 68 bytes while the formatted version is 101 bytes — the whitespace cost of readability.
| Input | Value |
|---|---|
| json | {"status":"ok","items":[{"id":1,"name":"A"},{"id":2,"name":"B"}]} |
| Result | Valid JSON · formatted with 2-space indent · input 68 B → formatted 101 B |