encodeJson static method
Encodes a JSON-serializable json
object into a list of bytes.
Implementation
static List<int> encodeJson(Object json,
{String? indent,
bool toStringEncodable = false,
Object? Function(dynamic)? toEncodable}) {
final value = fromJson(json,
indent: indent,
toStringEncodable: toStringEncodable,
toEncodable: toEncodable);
return encode(value);
}