SupportLog In

JSON / NDJSON

Studio

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.

FormatCharacteristic
SpecificationJSON, NDJSON
File Extension.json, .ndjson
MIME Typeapplication/json, application/x-ndjson
File TypeText

Notes:

  • Studio's tools can only load "tabular" JSON (containing an array of similar rows). Arbitrary (non-tabular) JSON files can not be loaded, unless they conform another supported JSON-based format, such as GeoJSON or a Studio or kepler.gl map.
  • NDJSON files must have the .ndjson extension.

Examples

Example of a valid JSON file containing tabular data:

[
  {
    "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.

{"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

idlongitudelatitude
"item-1"8040
"item-2"4030

Geometry in JSON files

  • Fields name longitude and latitude can be provided.
  • Fields with geospatial information, such as zip codes or census tracts or H3 indices is also supported.

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