Migrating from Jackson to JSON-B

272 Views Asked by At

As we're moving from Payara 4 to Payara 5, which using JSON-B (implemented by Yasson) as default, we're trying to configure JSON-B to have the same behavior as Jackson, which we used in Payara 4.

With Jackson we used the below configuration:

objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true);
objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
objectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);

How can I achieve the same behavior with JSON-B?

1

There are 1 best solutions below

1
Gonçalo On

check YassonProperties class. You should find it