Use %() to make quoting JSON simpler
Convert output string to JSON
Merge pull request #1 from johanek/master

Fix for invalid escaped characters