simdjson_dart library
Fast JSON decoding for Dart using the simdjson C++ library over FFI.
simdJsonDecode is a drop-in alternative to jsonDecode; use
simdJsonDecodeBytes when the input is already UTF-8 bytes, and
SimdJsonDocument to read selected fields out of large documents
without materializing the rest.
Classes
- SimdJsonDocument
- A parsed JSON document held open for lazy access.
Functions
-
simdJsonDecode(
String json) → Object? -
Decodes a JSON string, like
jsonDecodefromdart:convert, but parsed by the simdjson C++ library. -
simdJsonDecodeBytes(
Uint8List json) → Object? - Like simdJsonDecode, but takes UTF-8 bytes directly, skipping the string-to-bytes conversion. Prefer this when the JSON arrives as bytes (files, sockets, HTTP bodies).
-
simdJsonDecodeNdjson(
String ndjson) → List< Object?> -
Decodes newline-delimited JSON: one document per line, the shape log
files and data pipelines ship (
.ndjson,.jsonl). -
simdJsonDecodeNdjsonBytes(
Uint8List ndjson) → List< Object?> - Like simdJsonDecodeNdjson, but takes UTF-8 bytes directly. Prefer this when the data arrives as bytes, which for NDJSON it usually does.