When printing body/schema data that's json, it tries to print it nicely.

Example without the prettify method:

    "bodySchema": "{\n  \"type\":\"object\",\n  \"$schema\": \"http://json-schema.org/draft-03/schema\",\n  \"required\"

So obj is a string of collapsed json. We parse it into an object, if possible, so that when the transaction object as a whole is stringified, we get nice looking JSON instead of a string of collapsed JSON.

I realize that this seems like really confusing nomenclature now ;) I'll work on something better. But that's where it comes from.