jsonObjectWriter function
Creates a JsonSink which builds a Dart JSON object structure.
After adding values corresponding to a JSON structure to the sink,
the result
callback is called with the resulting object structure.
When result
is called, the returned sink is reset and can be reused.
Implementation
JsonWriter<Object?> jsonObjectWriter(void Function(Object?) result) =>
JsonObjectWriter(result);