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

8 views
Skip to first unread message

Joo Hyuk Kim (Vince)

unread,
Jun 12, 2024, 2:29:00 AMJun 12
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 PMJun 13
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 AMJun 14
to jackso...@googlegroups.com

Josh Curry

unread,
Jun 14, 2024, 1:32:52 AMJun 14
to jackso...@googlegroups.com

Guido Medina

unread,
Jun 14, 2024, 4:56:40 AMJun 14
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 PMJun 14
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.
Reply all
Reply to author
Forward
0 new messages