BufferedSinkJsonWriter
A JsonWriter that writes json to an okio BufferedSink
The base implementation was taken from Moshi and ported to Kotlin multiplatform with some tweaks to make it better suited for GraphQL (see JsonWriter and path).
To writer to a Map, see also MapJsonWriter
Parameters
: A string containing a full set of spaces for a single level of indentation, or null for no pretty printing.
Properties
Functions
Begins encoding a new array. Each call to this method must be paired with a call to endArray.
Begins encoding a new object. Each call to this method must be paired with a call to endObject.
Ends encoding the current array.
Ends encoding the current object.
Writes the given value as raw json without escaping. It is the caller responsibility to make sure value is a valid json string
Encodes the property name.
Encodes null
.
Encodes a Upload.
Encodes number value
.
Encodes boolean value
.
Encodes a finite double value
.
Encodes int value
.
Encodes long value
.
Encodes the literal string value
, or null to encode a null literal.