Flexible input, explicit output
Use the document shape you already have.
JSON may be a nested document, a stream of records, or a table-like array. loaders.gl keeps those cases separate while letting applications select object rows, arrays, columns, Arrow, or geometry tables where appropriate.
Documents
Load arbitrary nested JSON without imposing a table schema.
Records
Stream NDJSON or row arrays incrementally.
Geospatial
Decode GeoJSON into shared geometry data shapes.
Output
Write JSON values or compatible table representations.
Detailed guide
JSON format and API details
The reference below compares JSON loaders, streaming variants, GeoJSON behavior, output shapes, and writers.
Loaders and Writers
LoaderJSONLoaderLoads arbitrary JSON documents and can extract arrays as loaders.gl row tables.LoaderJSONTableLoaderLoads JSON row arrays as loaders.gl row tables or Apache Arrow tables.WriterJSONWriterWrites loaders.gl tables as JSON arrays or custom wrapped JSON values.
| Characteristic | Value |
|---|---|
| File Format | JSON |
| Data Format | JSON objects, arrays, and Tables |
| File Type | Text |
| File Extension | .json |
| MIME Types | application/json |
Streaming Variants
| Format | Extension | MIME Media Type | Support |
|---|---|---|---|
| JSON | .json | application/json | ✅ JSONLoader |
| NewLine Delimited JSON | .ndjson | application/x-ndjson | ✅ NDJSONLoader |
| JSON Lines | .jsonl | application/x-ldjson | ✅ NDJSONLoader |
| JSON Text Sequences | application/json-seq | ⚠️ NDJSONLoader. Partial records must not span multiple lines. | |
| GeoJSON | .geojson | application/geo+json | ✅ GeoJSONLoader |
| Newline Delimited GeoJSON | .ndgeojson | ✅ NDGeoJSONLoader | |
| GeoJSON Lines | .geojsonl | ✅ NDGeoJSONLoader | |
| GeoJSON Text Sequences | application/geo+json-seq | ⚠️ NDGeoJSONLoader. Each Feature must fit on one line. |
