Improvements to --to-json feature
More tweaks for json output
Add JSON tests to testing suite
Version bump