JSON / NDJSON

Studio can load JSON (Javascript Object Notation) and NDJSON (Newline delimited JSON) files. JSON files must contain tabular data, in the form of an array of row objects. NDJSON files contain one row of data per line.

Format Characteristic
Specification JSON, NDJSON
File Extension .json, .ndjson
MIME Type application/json, application/x-ndjson
File Type Text

Notes:

Examples

Example of a valid JSON file containing tabular data:

JSON

[\
  {\
    "id": "item-1",\
    "longitude": 80,\
    "latitude": 40\
  },\
  {\
    "id": "item-2",\
    "longitude": 70,\
    "latitude": 30\
  }\
]

An NDJSON file must not be wrapped with a JSON array ([``]), and requires each

element to be placed on a separate row, without a comma (,) after each object.

JSON

{"id": "item-1", "longitude": 80, "latitude": 40}
{"id": "item-2", "longitude": 70, "latitude": 30}

Both of thee above files will be loaded into a table as follows

id longitude latitude
"item-1" 80 40
"item-2" 70 30

Geometry in JSON files

For complex geometries, GeoJSON is the standard format for encoding geometry in JSON files.

Updated 5 months ago