JsonUtf8Encoder class

Encoder that encodes a single object as a UTF-8 encoded JSON string.

Encoder that encodes a single object as a UTF-8 encoded JSON string.

This encoder works equivalently to first converting the object to a JSON string, and then UTF-8 encoding the string, but without creating an intermediate string.

Extends:

Constructors

JsonUtf8Encoder ( [String indent, dynamic toEncodable(Object object), int bufferSize = DEFAULT_BUFFER_SIZE] )
Create converter.

Constants

DEFAULT_BUFFER_SIZE = 256
Default buffer size used by the JSON-to-UTF-8 encoder.

Instance Methods

convert ( Object object ) → List<int>
Convert object into UTF-8 encoded JSON.
startChunkedConversion ( Sink<List<int>> sink ) → ChunkedConversionSink<Object>
Start a chunked conversion.
bind ( Stream<Object> stream ) → Stream<List<int>>
Transform the incoming [stream]'s events.
fuse ( Converter<List<int>> other ) → Converter<Object>
Fuses this with [other].