convert method
Converts the contents to a string with ansi color.
Implementation
StringBuffer convert(dynamic contents) {
switch (contents) {
case Map():
_printMap(contents, 0);
case List():
_printList(contents, 0);
case String():
convert(json.decode(contents));
default:
throw UnimplementedError();
}
_enter();
return _buf;
}