The deploy failed at 11 PM with a cryptic error: "Unexpected token } in JSON at position 5824."
Two developers stared at the minified config file for ten minutes. Line 247. A trailing comma in a 200KB JSON object.
Why Minified JSON Is a Trap
Minified JSON saves bandwidth but costs debugging time. When everything is on one line, a syntax error is invisible.
What I do now:
- Beautify JSON before any code review
- Validate syntax before every deploy
- Never debug minified output directly
The Tool That Saves Me
formlyapp.org does all three in the browser. It formats, validates, and highlights errors instantly. No data leaves your machine.
My pre-deploy checklist:
-
json.loads()the config file - Run it through a formatter
- Only minify as the final build step
What is your worst production JSON debugging story?
Top comments (0)