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.
Category data
Load many formats into one application path.
Category data lets related loaders return compatible structures, so rendering, analysis, and export code can be shared.
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
| Loader | Notes |
|---|---|
JSONLoader | JSON documents and nested values |
BSONLoader | Binary JSON documents |
XMLLoader | XML documents represented as JavaScript data |
HTMLLoader | HTML documents and fragments |
YAMLLoader | Human-readable YAML documents; provided by @loaders.gl/documents. |
TOMLLoader | Configuration-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.