[#117] Add test for as_json/1
Merge pull request #120 from saa/master

[#117] Add test for as_json/1