JsonDocumentTransformer class

A StreamChannelTransformer that transforms JSON documents—strings that contain individual objects encoded as JSON—into decoded Dart objects.

This decodes JSON that's emitted by the transformed channel's stream, and encodes objects so that JSON is passed to the transformed channel's sink.

If the transformed channel emits invalid JSON, this emits a FormatException. If an unencodable object is added to the sink, it synchronously throws a JsonUnsupportedObjectError.

Implemented types

Constructors

JsonDocumentTransformer({dynamic reviver(dynamic key, dynamic value), dynamic toEncodable(dynamic object) })
Creates a new transformer. [...]

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

bind(StreamChannel<String> channel) StreamChannel<Object>
Transforms the events sent to and emitted by channel. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited