Add -json output mode for shell
Merge pull request #526 from theopolis/json-output

Add -json output mode for shell