saveJson function
Writes json
in filepath
, with the option to beautify
the string.
Implementation
void saveJson(String filepath, dynamic json, {bool beautify = false}) {
String str;
if (json is! String) {
str = beautify ? prettyJson(json) : jsonEncode(json);
} else {
str = json;
}
saveString(filepath, str);
}