feature/json

Modified and added test case from #8 .