format static method
Implementation
static String format(
dynamic data, {
int deep = 0,
String indentation = " ",
String key = "",
}) {
try {
if (data is String) {
data = jsonDecode(data);
}
StringBuffer buffer = StringBuffer();
//解析List
if (data is List) {
buffer.write(_parseList(data));
} else if (data is Map) {
//解析map
buffer.write(_parseMap(data, count: deep, indentation: indentation));
}
return buffer.toString();
} catch (e) {
print(e);
}
return "";
}