Chevron Down
Table of Contents
Chevron DownAPI Reference


Streaming loader for JSON encoded files.

File Extension.json,
File TypeText
File FormatJSON
Data FormatClassic Table
Supported APIsload, parse, parseSync, parseInBatches


import {JSONLoader} from '';
import {load} from '';

const data = await load(url, JSONLoader, {json: options});

The JSONLoader supports streaming JSON parsing, in which case it will yield "batches" of rows from the first array it encounters in the JSON. To e.g. parse a stream of GeoJSON:

import {JSONLoader} from '';
import {load} from '';

const data = await loadInBatches('geojson.json', JSONLoader);

for await (const batch of batches) {
  // will contain a number of rows
  for (const feature of {
    switch (feature.geometry.type) {
      case 'Polygon':


json.tableBooleanTBDParse JSON as table, i.e. return the first embedded array in the JSON.


This loader is based on a fork of dscape's clarinet under BSD 2-clause license.