JSON Basics/Root array

A JSON document can start with an array.

Section: Valid JSON roots

Root array

json
json
[
  { "id": 1 },
  { "id": 2 }
]
Explanation

Arrays are common for list-style payloads and exports.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Valid JSON roots
Root object
A JSON document can start with an object.
OpenIn sheetjsonsame section
Root string
A single JSON string is also valid JSON.
OpenIn sheetjsonsame section
Root number
A number can be the entire JSON document.
OpenIn sheetjsonsame section
Root null
`null` is valid as a complete JSON document.
OpenIn sheetjsonsame section
Use double quotes for keys and strings
JSON requires double quotes, not single quotes.
OpenIn sheetjson1 tag match
Do not use trailing commas
Trailing commas make JSON invalid.
OpenIn sheetjson1 tag match