Using JSON Minifier: practical guide
When to minify JSON
Minifying removes spaces and line breaks so the same data takes fewer bytes. It helps when you embed JSON in a config value, a URL parameter or a request body, and when file size matters.
Validate first, keep a readable copy
A minifier needs valid JSON, so fix errors such as trailing commas or single quotes first. Keep a formatted copy for people to read and edit, and minify only the version you ship.