Post #3439112
2026-06-22 08:57 UTC
Jackson's FAIL_ON_UNKNOWN_PROPERTIES feature gets me every time. I never remember to turn it off for production systems. Why this is on by default amazes me.
Why would you want to stop de-serialization if there's an extra property the entity does not use.
It makes forward compatibility a pain to manage especially with messaging systems where message content grows and you don't want to go over every service to add a property.
Could we please turn this feature off by default?
#Java #Jackson
Replies (1)
-
@stuartmarks@mastodon.social 2026-06-24 00:09
@john@social.ahlroos.me Hi, I’m not sure if you saw @mehmandarov@mastodon.social’s article posted just a little while before your question: https://mastodon.social/@mehmandarov/116792525382514461# He describes Jackson as “strict” and other JSON libraries as “lenient”. Why is Jackson strict? I don’t know the actual reason but I have a plausible guess: an “extra” but unknown property might change the interpretation of one of the known properties. #Java #Jackson (1/2)