FasterXML / FasterXML/jackson-databind
Add feature for writing Java `null` Strings as `""`, write null `java.util.Collection` or array as `[]`
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 1.5k
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 28
Description
Hi Jackson community!
Our front-end colleague do not want to get null from back-end, and I tried to overwrite some kinds of null as default values. Here are 3 kinds of them: String, Collection and array. And I have tried some approaches, like setNullSerializer, overwrite CollectionSerializer, but not fits well.
Another way to achieve this is using reflection to replace a default value to null properties before serialization, but I don't prefer this because it would reduce server performance.
It seems to be a common requirement. So it would be great if jackson supports this feature.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.