Thank you for your help.
This is a server-side development in Java.
I'm binding data using Jackson's JsonNode mechanism, but what should I do if I want to convert it to an empty string when the value of the map in JsonNode has Null?
I can find samples to add Key/Value to the map and delete Key/Value from the map, but I am troubled that I cannot find the details of the above process.
Judging from the content of the comments, I think the following implementation will work.
// First: need a custom serializer provider
DefaultSerializerProvider.Implsp=new DefaultSerializerProvider.Impl();
sp.setNullValueSerializer (newNullValueSerializer());
// And then configure mapper to use it
ObjectMapper m = new ObjectMapper();
m.setSerializerProvider(sp);
© 2024 OneMinuteCode. All rights reserved.