jakartaee / jsonb-api

Jakarta JSON Binding
https://eclipse-ee4j.github.io/jsonb-api/
Other
78 stars 39 forks source link

Add a config option to allow empty values or not #268

Open hantsy opened 3 years ago

hantsy commented 3 years ago

When serializing an object, Jackson has some configuration to filter the NULL, empty values, but it seems Jsonb config only includes a withNullValues option, and there is no option to ignore empty values, such as:

rmannibucau commented 3 years ago

Hi @hantsy , think it relates to https://github.com/eclipse-ee4j/jsonb-api/issues/121 where the instantiation is blocked, for all other cases you can handle it with a setter (setXXX(JsonValue v))