implementation of JsonToStringStyle with test cases