[{"data":1,"prerenderedAt":99},["ShallowReactive",2],{"json-guide-list-en":3,"json-article-en-json-minification-explained":29},[4,9,14,19,24],{"slug":5,"title":6,"description":7,"eyebrow":8},"fix-invalid-json","How to fix invalid JSON","Diagnose trailing commas, single quotes, comments, malformed strings, and missing brackets in invalid JSON.","ERROR GUIDE",{"slug":10,"title":11,"description":12,"eyebrow":13},"json-minification-explained","JSON minification explained","Learn what JSON minification removes, what data it preserves, and when smaller JSON is useful.","CORE CONCEPT",{"slug":15,"title":16,"description":17,"eyebrow":18},"json-minify-vs-compress","JSON minification vs compression","Compare whitespace minification with gzip and Brotli transport compression for JSON files and API responses.","SIZE COMPARISON",{"slug":20,"title":21,"description":22,"eyebrow":23},"json-whitespace-and-size","How JSON whitespace affects file size","Understand which JSON whitespace can be removed and how to measure realistic byte savings.","SIZE & MEASUREMENT",{"slug":25,"title":26,"description":27,"eyebrow":28},"minify-json-for-production","Minify JSON safely for production","Use a practical checklist to validate, minify, compress, cache, and monitor production JSON assets.","PRODUCTION CHECKLIST",{"id":30,"title":11,"body":31,"description":12,"extension":38,"eyebrow":13,"faqs":39,"intro":49,"meta":50,"navigation":51,"path":52,"relatedGuides":53,"sections":54,"seo":94,"seoTitle":95,"slug":10,"stem":96,"type":97,"__hash__":98},"articles\u002Fen\u002Farticles\u002Fjson-minification-explained.md",{"type":32,"value":33,"toc":34},"minimark",[],{"title":35,"searchDepth":36,"depth":36,"links":37},"",2,[],"md",[40,43,46],{"question":41,"answer":42},"Does working with JSON minification change the underlying data?","It should not change meaning when the operation is purely representational, but parsers may resolve aliases, normalize numbers, drop comments, or choose a different textual style. Compare parsed structures and review the destination’s rules.",{"question":44,"answer":45},"How can I verify the result?","Parse both sides where possible, compare keys and value types, then test the generated result in its real consumer. A visual comparison alone can miss null, number, Boolean, encoding, or duplicate-key differences.",{"question":47,"answer":48},"When should I avoid an automatic conversion?","Avoid unattended conversion when the source uses implementation-specific features, duplicate keys, custom tags, comments that carry operational knowledge, or numeric values whose precision cannot be safely represented.","JSON minification removes insignificant whitespace outside strings. It does not rename keys, change values, or compress the result with a binary algorithm.",{},true,"\u002Fen\u002Farticles\u002Fjson-minification-explained",[15,20,25],[55,60,64,68,77,83,88],{"title":56,"paragraphs":57,"code":59},"What gets removed",[58],"Spaces, tabs, and line breaks between JSON tokens are optional. A minifier parses valid input and serializes the same value without that presentation whitespace.","{\"project\":\"catalog\",\"enabled\":true,\"ports\":[80,443]}",{"title":61,"paragraphs":62},"What must stay unchanged",[63],"Whitespace inside quoted strings is data and must remain. Object keys, array order, strings, numbers, booleans, and null values keep their meaning.",{"title":65,"paragraphs":66},"When to minify",[67],"Minification is useful for generated payloads, embedded fixtures, build artifacts, and quick size comparisons. Keep a readable source copy for maintenance.",{"title":69,"paragraphs":70,"bullets":73},"A reliable step-by-step workflow",[71,72],"Treat JSON minification as a data transformation with an explicit input, expected structure, and destination. Work on a copy, validate before changing representation, and isolate the smallest useful sample. This separates syntax failures from data-model or application failures.","Run one change at a time and repeat the same validation after each change. For automated pipelines, fail the job on a parser error instead of publishing a partial or guessed result. Keep the original input beside the generated artifact when traceability matters.",[74,75,76],"Start with a representative input and keep an untouched copy so the transformation can be reviewed or repeated.","Inspect the parsed structure, not only the rendered text; keys, scalar types, array order, and null values are what downstream software receives.","Test the result in the real destination and record any parser, schema, encoding, or formatting assumptions in the project.",{"title":78,"paragraphs":79,"code":82},"Worked example and verification",[80,81],"The compact sample below is intentionally small enough to inspect by eye. Use the same pattern with a real document: confirm every key, scalar type, list order, and nested boundary before accepting the output.","A successful conversion or minification only proves that the source could be parsed. Compare the parsed value before and after the operation, then load the result with the same library or platform that will consume it in production.","{\"service\":\"api\",\"retries\":3,\"enabled\":true}",{"title":84,"paragraphs":85},"Limits and edge cases",[86,87],"The difficult cases in JSON minification usually come from differences between syntax validity and application validity. A parser can accept data that is still incomplete, ambiguous, too large, or incompatible with a destination schema.","Never repair or normalize an unfamiliar document blindly. Duplicate keys, implicit types, aliases, precision limits, Unicode, line endings, and very large inputs deserve an explicit policy. When the destination has stricter rules, those rules win.",{"title":89,"paragraphs":90,"bullets":93},"Production checklist",[91,92],"Before release, test a normal document, an empty value, deeply nested data, non-ASCII text, and a deliberately malformed example. Record the tool or library version if another system must reproduce the exact output.","Make validation part of continuous integration when the data affects builds, deployments, APIs, or configuration. Review diffs, keep a rollback copy, and monitor the first consumer after deployment rather than assuming a syntactically valid file is operationally correct.",[74,75,76],{"title":11,"description":12},"JSON Minification Explained — What It Removes and Preserves","en\u002Farticles\u002Fjson-minification-explained","guide","feJD_2wNncdVu4Jde7eBF1VdaFRVCEFIoFaZt10VsdQ",1791969046522]