I use FastJSON to deserialize a json into an object. During the deserialization I would like to automatically replace all the null values in the json by an empty string. Is there a JSON parameter to do that? Otherwise, what would you suggest?
Fastjson ToObject transform null to empty string
1.2k views Asked by charmosz At
1
You can use
JSON.parseObject(String json, Class<T> clazz, Feature... features)
method and pass throughFeature.InitStringFieldAsEmpty
as last argument.