Read and immediately re-emit clean JSON.
Section: Common parse failures
Rewrite valid JSON in normalized form
bash
bash
jq . broken-or-ugly.json > normalized.jsonExplanation
This is useful once the file parses and you want a canonical pretty form.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Common parse failures
Raw newlines inside strings are invalid
Use `\n` rather than an actual line break inside a string literal.