Skip to main content

BSONLoader

bson-logo

From-v3.4

This loader is part of the @loaders.gl/bson module.

Streaming loader for BSON encoded files.

LoaderCharacteristic
File FormatBSON
Data FormatUnstructured/JSON
File Extension.bson
Media Typeapplication/bson
File TypeBinary
Supported APIsload, parse, parseSync

Usage

For simple usage, you can load and parse a BSON file atomically:

import {BSONLoader} from '@loaders.gl/bson';
import {load} from '@loaders.gl/core';

const data = await load(url, BSONLoader, {bson: options});

Options

Supports table category options such as batchType and batchSize.

OptionFromTypeDefaultDescription

Note: Currently passes through options to the underlying js-bson module but this may change in future versions and should not be relied upon.