I am looking for a nice way to pretty-print a Map.
map.toString() gives me: {key1=value1, key2=value2, key3=value3}
I
Does not answer exactly the question, but it is worth mentioning Lombodok @ToString annotation. If you annotate with @ToString the key / value classes, then doing System.out.println(map) will return something meaningful.
It also works very well with maps-of-maps, for example:
Map will be printed as
{MyKeyClass(properties...)={string1=MyValuesClass(properties...), string2=MyValuesCalss(properties...),..},
...
}