feat(index): add support for outputing json
test(main): fix error message
test(main): add json testcase
Merge pull request #9 from tomchentw/feature/json

feature/json