jsonEncode static method
String
jsonEncode(
- Object? object, {
- Object? toEncodable(
- Object? object
- JsonEncodeOptions? options,
- String? indent,
options is fully optional: leave it null (the default) for
behavior identical to dart:convert's jsonEncode - pass one to opt
into the BigInt/JsonBinary features (see the library doc above).
indent, if given (e.g. ' ' or '\t'), pretty-prints the output
with a newline + that many indent units per nesting level, instead of
the default compact single-line output.
Implementation
static String jsonEncode(
Object? object, {
Object? Function(Object? object)? toEncodable,
JsonEncodeOptions? options,
String? indent,
}) {
final buf = StringBuffer();
_encodeValue(buf, object, toEncodable, options, <Object?>[], indent, 0);
return buf.toString();
}