json5Encode function
Convert the object to json5 string.
Currently, only objects that inherit from Map or List are supported.
The altenative is JSON5.stringify(string)
Implementation
String json5Encode(
dynamic object, {
space = 0,
Object? Function(Object? nonEncodable)? toEncodable,
}) {
return render.stringify(object, null, space, toEncodable ?? _toEncodable);
}