Before you start
- An actual JSON text file and a source backup. An HTML error response is not JSON.
- Permission to access and save remote or cloud files. Keep sensitive data out of public examples.
- Normal editing mode; large-file lightweight mode may disable validation and formatting.
Step by step
Open and inspect
Open the JSON file in PatchDoc and find its objects, arrays, and key fields. Syntax highlighting helps reading but does not validate the document.
Validate first
Choose Validate JSON from the file menu. On failure, check quotes, commas, brackets, and escapes, fix them, and validate again.
Format or minify
Format JSON adds readable indentation. Minify JSON removes layout whitespace. Both change the current editor text; review keys and values before saving.
Check important data
Review strings, arrays, booleans, and null values. Formatting does not check business rules or guarantee identical key order and numeric spelling. Keep and compare the source when these details matter.
Save and reopen
Save or Save As, reopen the actual destination, and validate again. If another program consumes the file, test its configuration or data contract there too.
A valid JSON example
JSON{
"title": "Project notes",
"enabled": true,
"tags": ["mobile", "draft"],
"count": 2,
"optional": null
}Use double quotes for keys and strings, and no trailing comma after the last field. true and null are values, rather than quoted strings.
Check your result
Reopen and validate the saved JSON, compare key fields and types, and check it in the program that will use it.
Scope and limitations
- Validation checks JSON syntax, rather than business fields, an API contract, or complete JSON Schema conformance.
- Standard JSON excludes comments, single-quoted strings, and trailing commas. JSONC and JavaScript object literals may fail ordinary JSON validation.
- Formatting and minification reserialize data. Keep the original when precise numeric representation, key order, or original bytes matter.
Troubleshooting
A seemingly valid file fails
Check curly quotes, comments, trailing commas, bracket pairs, and unescaped newlines. Confirm you copied a complete JSON document.
Formatting controls are missing
Check the .json extension and lightweight editing mode. Try the small example on this page in a new file.
Validation passes but the app rejects it
Check expected field names, types, and configuration rules. Valid syntax does not prove the data meets the consuming app’s requirements.
Common questions
Does minifying JSON create a ZIP?
No. Minification removes layout whitespace and keeps JSON text. ZIP packaging is a separate archive feature.
Does editing run JSON or source code?
JSON is data. This workflow edits files; code execution or remote commands belong to separate workflows.
Instructions reflect the reviewed feature set. Control placement may vary by version.