Using dart:convert
I can get an unindented string with this code.
var unformattedString = JSON.encode(jsonObject);
How do I take a JSON object and convert it to an indented string?
One way to do it is by creating a JSONEncoder.withIndent instance.
String getPrettyJSONString(jsonObject){
var encoder = new JsonEncoder.withIndent(" ");
return encoder.convert(jsonObject);
}