Close #30. Convert non dictionary type to json and fix the tests