[Jackson 3] Default value(true/false) of `DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES`

34 views
Skip to first unread message

Joo Hyuk Kim (Vince)

unread,
Jun 12, 2024, 2:29:00 AM6/12/24
to jackson-user
# Background
This is offshoot from databind issue [1]"(for Jackson 3.x) Reconsider DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES default setting".

Asking here also, because some might not follow Github issue tracker.

And since this topic has been controversial, we might as well get more ideas before Jackson 3 release.

# Main

Simple question : What should be the default value(true/false) of  `DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES`, and Why?

Let us know what you think!

Thanks

Joo Hyuk Kim (Vince)

Tatu Saloranta

unread,
Jun 13, 2024, 9:58:27 PM6/13/24
to jackso...@googlegroups.com
We would really appreciate any and all feedback; even simple +1 or -1
for proposed change:

* Change default to NOT FAIL on Unknown Properties for Jackson 3.x
(default to disabled)

My impression is that many developers reflexively disable this setting
and many frameworks do likewise.
Given this there is certainly push for this. Perhaps there is consensus?

But not getting any feedback makes me nervous: default setting choices matter.

-+ Tatu +-
> --
> You received this message because you are subscribed to the Google Groups "jackson-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/da5db09c-1cc5-4e08-9727-5b0ed1256958n%40googlegroups.com.

Norbert Kiesel

unread,
Jun 14, 2024, 1:16:22 AM6/14/24
to jackso...@googlegroups.com

Josh Curry

unread,
Jun 14, 2024, 1:32:52 AM6/14/24
to jackso...@googlegroups.com

Guido Medina

unread,
Jun 14, 2024, 4:56:40 AM6/14/24
to jackso...@googlegroups.com
I disable this by default, sometimes when serializing to a POJO I'm most likely not interested in failing the serialization.

Tatu Saloranta

unread,
Jun 14, 2024, 11:19:03 PM6/14/24
to jackso...@googlegroups.com
Ok thank you everyone for giving feedback! It does seem like all
"votes" so far are for doing this,
with no one disagreeing. Will give it a weekend and come next week
this change can then proceed.

-+ Tatu +-
> To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/CAJsS9NM7cdCb4rVFMtb8y_gWSKHU1vgWGVjc%3DBWDQUXO1n%2B7RA%40mail.gmail.com.

Joo Hyuk Kim (Vince)

unread,
Jul 21, 2024, 11:05:31 AM7/21/24
to jackson-user
Change implemented via https://github.com/FasterXML/jackson-databind/pull/4625.
Thank you for your responses!

Mantas Gridinas

unread,
Jul 22, 2024, 12:04:12 PM7/22/24
to jackson-user
Might be tangental, but what is the proposed full list of defaults for Jackson 3?

Tatu Saloranta

unread,
Jul 22, 2024, 6:20:41 PM7/22/24
to jackso...@googlegroups.com
On Mon, Jul 22, 2024 at 9:04 AM Mantas Gridinas <mgri...@gmail.com> wrote:
>
> Might be tangental, but what is the proposed full list of defaults for Jackson 3?

There's no such list. One has to look at f.ex

https://github.com/FasterXML/jackson/wiki/Jackson-Release-3.0

to get some idea (but probably incomplete)

-+ Tatu +-
> To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/b1f6bcdd-e9e3-46d1-9277-b784b792d959n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages