The specific boolean type (defaults to boolean)
Creates a new JSON entity.
The specific boolean type (defaults to boolean)
Optionalbuffer: ByteStream | ByteBufferOptional ByteBuffer or ByteStream to read from
Sets whether to allow exceeding the buffer size temporarily. Default is true.
True to allow exceeding the buffer size, false to enforce the limit
Gets the current length of the buffer.
The number of bytes in the buffer
Gets the type name of this entity.
The constructor name of this entity
Sets the end-of-file (EOF) state of the buffer, indicating whether no more data will be added.
Sets the maximum buffer size before compaction occurs. Defaults to 100 KB.
NOTE: The buffer size may be exceeded temporarily during reads. For example, if a large string is read that exceeds the max size.
If this is not desired, set allowBufferToBeExceeded to false (default is true).
The maximum buffer size in bytes
Generators for post-comments. In JSONC, comments can appear before or after any value.
Async generators for post-comments. In JSONC, comments can appear before or after any value.
Convenience getters to read all post comments as strings. Consumes the comments in the process.
Generators for pre-comments. In JSONC, comments can appear before or after any value.
Async generators for pre-comments. In JSONC, comments can appear before or after any value.
Convenience getters to read all pre comments as strings. Consumes the comments in the process.
Convenience getter to read a single post comment as a string. Returns null if no comments are present. Consumes the comment in the process.
Convenience getter to read a single pre comment as a string. Returns null if no comments are present. Consumes the comment in the process.
Consumes the entity by reading it if not already consumed.
Asynchronously consumes the entity by reading it if not already consumed.
Feeds input data into the buffer.
One or more strings, numbers, arrays of numbers, or Uint8Arrays to add to the buffer
ProtectedparseAsynchronously reads and parses the entity from a stream.
A promise that resolves to the parsed value
ProtectedskipSkips whitespace characters (and comments when JSONC is enabled) in the buffer.
Attempts to parse by executing a callback, reverting buffer state on failure.
The return type of the callback
The callback function to execute
The result of the callback, or undefined if parsing needs more data
StaticstringifySerializes a value into a JSON string using json-stream-lite.
See jsonStreamStringify for more details.
Optionalreplacer: anyOptionaloptions: JsonStreamStringifyOptionsA generator yielding JSON string chunks
StaticstringifyAsynchronously serializes a value into a JSON string using json-stream-lite.
See jsonStreamStringifyAsync for more details.
Optionalreplacer: anyOptionaloptions: JsonStreamStringifyOptionsAn async generator yielding JSON string chunks
StaticstringifySerializes a value into JSON as Uint8Array byte chunks using json-stream-lite.
See jsonStreamStringifyBytes for more details.
Optionalreplacer: anyOptionaloptions: JsonStreamStringifyOptionsA generator yielding JSON byte chunks
StaticstringifyAsynchronously serializes a value into JSON as Uint8Array byte chunks using json-stream-lite.
See jsonStreamStringifyBytesAsync for more details.
Optionalreplacer: anyOptionaloptions: JsonStreamStringifyOptionsAn async generator yielding JSON byte chunks
Represents a JSON boolean value (true or false).