Sunday, October 19, 2014

Pretty Print JSON objects

Added --pretty as an option to the <var> tag for pretty printing JSON objects.  Changes pushed to git master.

<sink><null $header.content_type('application/json')>
<hash:foo red 1 blue 2 green 3>
</sink><var --pretty --json $foo>

...would yield

{
   "green" : "3",
   "blue" : "2",
   "red" : "1"
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.