[#117] Add test for as_json/1