Skip to main content

Loader category

Structured data without a special application model.

JSON-style loaders cover nested objects, arrays, scalar values, and related document formats. Use the same loaders.gl entry points for JSON, BSON, XML, and HTML when the application needs structured data rather than a geometry or table-specific shape.

Flexible input, explicit output

Keep the source structure until you know what to do with it.

These loaders preserve nested values and arrays as ordinary JavaScript data. Table-specific loaders and category conversion utilities are available when the next step needs columns instead.

Inputs

JSON, NDJSON, BSON, XML, and HTML

Output

Objects, arrays, scalar values, or streamed records

Streaming

Process newline-delimited records incrementally

Next step

Convert structured data into tables or application models

The JSON-style category is for loosely structured values that do not need a geometry- or table-specific result shape. Its loaders can return:

  • objects with name/value pairs,
  • arrays with integer indexes, and
  • fundamental scalar values such as strings, numbers, booleans, and null.

Detailed guide

The structured-data details

The sections below list category loaders and describe the data structures they return.

JSON Category Loaders​

LoaderNotes
JSONLoaderJSON documents and nested values
BSONLoaderBinary JSON documents
XMLLoaderXML documents represented as JavaScript data
HTMLLoaderHTML documents and fragments
YAMLLoaderHuman-readable YAML documents; provided by @loaders.gl/documents.
TOMLLoaderConfiguration-oriented TOML documents; provided by @loaders.gl/documents.

Data Structure​

Objects and arrays can contain other objects, arrays, or primitive values.

YAML and TOML are not JSON syntax, but their parsers produce the same general JavaScript data shapes and are therefore included here for discovery alongside other JSON-style loaders.