JsonMessage.toString(): can write contents as compacted or pretty to string.
+ minor changes