DEVELOPER GUIDE
How to format JSON safely
Formatting JSON is simple. Doing it without leaking secrets or changing the meaning of the data requires a little more care.
What formatting changes
A formatter parses JSON and writes it back with consistent whitespace and indentation. It should not change strings, numbers, booleans, arrays, objects or null values. Minifying removes unnecessary whitespace.
Object key order may be preserved by a tool, but JSON consumers should not rely on it. Valid JSON also does not necessarily match the schema your application expects.
Validate before using the result
Valid JSON requires double-quoted property names and strings, no trailing commas, and balanced braces and brackets. Fix the first reported syntax error before later errors, because one missing character can confuse the rest of the parser.
Keep sensitive values private
Configuration and API responses can contain tokens, session identifiers, customer records and internal URLs. Remove secrets before sharing data. Kanfire’s formatter runs in the browser tab and does not upload the JSON to Kanfire.
A safe workflow
Normal device, browser, clipboard and extension security still matters.
- Work from a copy of important data.
- Remove credentials and unnecessary personal information.
- Validate and fix the first syntax error.
- Format for review or minify for transport.
- Test the result in the consuming application.