it's the toString method. our json library uses json.org's implementation. apache's implementation has a so-called toCompactString method. it's just a json string without whitespace (ie, compact). our toPrettyString method includes indentation, linefeeds to make it look more legible. compact is not meant to imply compressed.