Flat two-dimensional tables struggle when an entity has a variable number of related child items.
Storing a customer who has three delivery addresses in a flat table requires repeating customer details.
JSON solves this by supporting nested objects and variable length arrays natively.
An object is an unordered collection of key-value pairs wrapped in curly braces.
An array is an ordered collection of values wrapped in square brackets.
Keys are always strings, while values can be strings, numbers, booleans, null, objects, or arrays.
This versatility allows JSON to represent complex hierarchical data in human readable text.
Web applications and modern microservices almost universally communicate by exchanging JSON payloads.
Document databases store raw records directly as JSON or its binary equivalents.
The trade-off is verbosity, as every single record repeats the field name keys on every row.
Repeating keys like customer identifier thousands of times inflates file sizes compared to columnar formats.
Furthermore, analysing deeply nested JSON in traditional tabular tools requires flattening steps.
Extracting nested lists into rows and columns is called unnesting, exploding, or normalising.
JSON enforces strict syntax rules: missing closing brackets or trailing commas cause parsing errors.
It is ideal for data interchange and nested records, but less efficient than tabular formats for bulk numerical analysis.