Post #3454288
2026-06-24 00:09 UTC
With the room example, the "floor" member indicates the floor of the building. But does «"floor": 1» indicate the ground floor (US style) or the first floor above ground level (EU style)? A new version might add «"groundFloor": 0» to indicate which convention is used. A strict implementation would give an error if "groundFloor" isn’t expected. This certainly can be inconvenient but it might be better than silently processing the record incorrectly. (2/2)
@john@social.ahlroos.me @mehmandarov@mastodon.social
Replies (1)
-
@john@social.ahlroos.me 2026-06-24 06:17
@stuartmarks@mastodon.social @mehmandarov@mastodon.social Thanks for the link, I hadn't seen it! It describes exactly the same issue. I want to add though that this isn't strictly about REST, this also affects message brokers. The point of recognizing added fields and typos is valid, but that strictness could be handled with warn logs, rather than complete failure by default. In the rare case you want stop deserializing when it happens then that should be a config option. Good to see other providers have realized this.