Writes value to sink in chunks, byte-identical to
JSON.stringify(value, null, indent).
A value with no JSON form at the top level (undefined, a function, a
symbol) throws, as does anything the delegated JSON.stringify rejects.
Two inputs no compiled document contains are not reproduced: a cycle
exhausts the stack instead of reporting a circular structure, and a boxed
BigInt serializes as an object rather than throwing.
Writes
valuetosinkin chunks, byte-identical toJSON.stringify(value, null, indent).A value with no JSON form at the top level (
undefined, a function, a symbol) throws, as does anything the delegatedJSON.stringifyrejects. Two inputs no compiled document contains are not reproduced: a cycle exhausts the stack instead of reporting a circular structure, and a boxedBigIntserializes as an object rather than throwing.