JSON Data
Web & DevelopmentJSON represents objects and arrays as data. Standard JSON uses double-quoted keys/strings and excludes comments and trailing commas. JSONC-like syntax is not necessarily accepted.
- What it is used for
- Application settings, APIs and data exchange
- What the file contains
- Text
All sections, questions and sources
Content reviewed: · Editor:Kai
Opening steps
Choose your environment or purpose to see its steps.
Menu labels and support vary by app, OS and version. Preserve the original before making changes.
Troubleshooting by symptom
- Syntax failure: check trailing commas, single quotes, comments and escaped newlines.
- Valid syntax but rejected: inspect required keys/types and the application’s schema.
- Encoding failure: check UTF-8 for interchange and identify the source encoding before resaving.
- Trailing-comma error: strict JSON disallows trailing commas/comments; distinguish JSONC settings.
- Identifier digits change: check integer precision and use strings when required by the schema.
- Valid JSON is rejected: compare required keys, types and permitted values with the schema.
JSON → CSV / formatted JSON
- Choose the array/columns and decide how nested values should be represented.
- Export separately and compare row count, leading zeros, dates and missing values.
- Compare keys, record counts and types before/after conversion and document unsupported items.
CSV may lose nesting and type information. Keep the original JSON.
Minimal JSON and value types
Keys and strings use double quotes. A numeric string differs from a number, and null differs from an empty string.
Formatting improves readability; it does not establish schema or value correctness.
{"name":"example","count":2,"enabled":true,"items":["a","b"]}Source for these steps:Microsoft · Editing JSON with Visual Studio Code / Python Software Foundation · json — JSON encoder and decoder
Checking hierarchy lost during CSV export
Nested objects/arrays differ from a flat table. Decide whether array expansion creates more rows or separate tables.
Retain JSON and inspect the meaning of identifiers, nulls and multiline strings in the output.
Source for these steps:Microsoft · Editing JSON with Visual Studio Code / Python Software Foundation · json — JSON encoder and decoder
Related-format differences
| Format | Main role | Selection notes |
|---|---|---|
| JSON | Hierarchical data | Validate keys and types |
| CSV | Flat table | Requires flattening rules |
| JSONC | Comment-capable settings | Different from strict JSON |
Handling and security
Settings may contain tokens/API keys. Check secrets before using online formatters and review the consuming application’s behavior.
Questions and answers
Does JSON allow comments?
Standard JSON does not; JSONC support is application-specific.
Is a quoted number still a number?
No; it becomes a string.
Does formatting repair bad data?
No; inspect syntax and application requirements.
Does JSON automatically become a spreadsheet?
Decide how to flatten objects/arrays into rows and columns and verify the imported counts.
May I repeat an object key?
Avoid it because implementations may handle duplicates differently. Detect and resolve them intentionally.
Format facts: name, steward and MIME type
- Formal name
- JavaScript Object Notation
- Steward / specification
- IETF (RFC 8259)
- MIME type
- application/json
Primary and official sources
- StandardRFC 8259 — JSON
Defines JSON syntax and interoperability considerations.
IETF / RFC Editor · Link checked: - Software documentationEditing JSON with Visual Studio Code
Documents JSON validation, formatting and JSONC support.
Microsoft · Link checked: - Project documentationjson — JSON encoder and decoder
JSON types, parsing and numeric/duplicate-key considerations.
Python Software Foundation · Link checked: