jsonByteWriter function
Creates a JsonSink which builds a byte representation of the JSON structure.
The bytes are written to sink
, which is closed when a complete JSON
value / object structure has been written.
If asciiOnly
is true, string values will escape any non-ASCII
character. If false or unspecified and encoding
is utf8, only
control characters are escaped.
The resulting byte representation is a minimal JSON text with no whitespace between tokens.
Implementation
JsonWriter<List<int>> jsonByteWriter(Sink<List<int>> sink,
{Encoding encoding = utf8, bool? asciiOnly}) {
return JsonByteWriter(sink, encoding: encoding, asciiOnly: false);
}