Implemented converting Java object with primitive types to JSON