JsonWriter<T> class abstract

A JSON sink which emits JSON source or JSON-like structures.

The addSourceValue method injects the representation of a value directly as the target type T, e.g., String or List<int> depending no what is being written to. Can be used with the value of JsonReader.expectAnyValueSource to avoid parsing a value.

Implemented types
Available Extensions

Constructors

JsonWriter()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addBool(bool value) → void
Called for a boolean value.
inherited
addKey(String key) → void
Sets the key for the next value of an object.
inherited
addNull() → void
Called for a null value.
inherited
addNumber(num value) → void
Called for a number value.
inherited
addSourceValue(T source) → void
Adds a JSON value as source to the sink.
addString(String value) → void
Called for a string value.
inherited
endArray() → void
Ends the current array.
inherited
endObject() → void
Ends the current object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startArray() → void
Called at the beginning of an array value.
inherited
startObject() → void
Called at the beginning of an object value.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited