Create a JSON.parse that uses a stream interface. The underlying implementation is handled by JSONStream. This is merely a thin wrapper for convenience that handles the reconstruction/accumulation of each individually parsed field.
The advantage of this approach is that by also using a streams interface, any JSON parsing or stringification of large objects won't block the CPU.
Returns Stream
create a JSON.stringify readable stream.
Returns Stream
stream based JSON.parse. async function signature to abstract over streams.
Returns (Object | Array) the parsed JSON
stream based JSON.parse. async function signature to abstract over streams. variadic arguments to support both promise and callback based usage.
opts
Object options to pass to parse streamopts.body
String string to parse
callback
Function? a callback function. if empty, returns a promise.
Returns (Object | Array) the parsed JSON
stream based JSON.stringify. async function signature to abstract over streams. variadic arguments to support both promise and callback based usage.
opts
Object options to pass to stringify streamcallback
Function? a callback function. if empty, returns a promise.
Returns Object the parsed JSON object