Structured JSON
Structured JSON
Stringify and parse JavaScript values according to Structured Clone Algorithm.
Stringify and parse JavaScript values according to Structured Clone Algorithm.
This allows sending more advanced JS types across the network, including Date, Map, Set, ArrayBuffer and various typed arrays.
Usage
import * as Structured from '@worker-tools/structured-json'
The module exposes these functions:
Structured.stringifyStructured.parseStructured.toJSONStructured.fromJSON
This module supports File, Blob and FileList, however use of stringifyAsync or toJSONAsync is required if your data contains any of these.
Links: GitHub | ghuc.cc · NPM | Browse Package · deno.land | Docs