Skip to content
Morphr

Data format · .json

What is a JSON file?

JSON is the data format of the modern web — structured data written as nested objects and arrays, in plain text every programming language can parse. It came from JavaScript but belongs to everyone now, and it's the default way APIs, config files and apps exchange structured information.

Full name
JavaScript Object Notation
Category
Data
File extension
.json
MIME type
application/json
Developer
Douglas Crockford
First released
2001
Compression
None (plain text)
Standard
Open (ECMA-404 / RFC 8259)

Structure people and machines both read

JSON represents data as key/value objects ({ }) and ordered lists ([ ]), nested as deeply as needed, with a handful of simple value types: strings, numbers, booleans, null. That tiny vocabulary is enough to model almost any structured data, and because it maps directly onto the data structures programming languages already use, parsing it is trivial everywhere.

Douglas Crockford specified it in the early 2000s, and it deliberately stayed minimal — no comments, no dates, no schema built in. That minimalism is why it standardised so cleanly (ECMA-404, RFC 8259) and edged out the heavier XML for most web work.

Where JSON fits, and where it doesn't

JSON shines for web APIs, configuration and any structured data passing between programs. It's less suited to large tabular datasets (CSV streams more cheaply), to human-edited config where comments matter (YAML or TOML are friendlier), and to anything needing comments or trailing commas, which strict JSON forbids. For huge or streamed datasets, JSON Lines — one JSON record per line — is the common variant.

Strengths

  • Parsed natively by every major programming language.
  • Human-readable yet strictly structured.
  • The de facto standard for web APIs and config.

Limitations

  • No comments or trailing commas allowed.
  • No built-in date or schema types.
  • Verbose for large tabular data compared with CSV.

When to use JSON

Use JSON for web APIs, app data and structured config. For flat tables prefer CSV; for human-edited config consider YAML or TOML; for huge datasets consider JSON Lines.

JSON FAQ

What is a JSON file used for?
JSON holds structured data — it's how web APIs send responses, how many apps store settings, and how programs exchange information. It's plain text, so any editor opens it.
What's the difference between JSON and CSV?
CSV is a flat table of rows and columns; JSON represents nested, hierarchical data. Converting CSV to JSON turns each row into an object keyed by the header; converting JSON to CSV flattens the structure into columns.
Can JSON have comments?
No — standard JSON doesn't allow comments or trailing commas. If you need comments in a config file, YAML or TOML are better choices.