Added --json option and tests.
Merge pull request #61 from carymrobbins/add-json

Added --json option and tests.