In Rust, I suppose I would've seen this coming, because the way to flatten a subobject is to annotate it with serde(flatten), and that is also the way to record a list of unknown properties.
But this is a Java project, and the Jackson library has different annotations for these purposes: JsonUnwrapped for flattening, and JsonAnyGetter/JsonAnySetter for collecting unknown properties.
It was not obvious that JsonUnwrapped and JsonAnyGetter/JsonAnySetter would interact like this!
But this is a Java project, and the Jackson library has different annotations for these purposes: JsonUnwrapped for flattening, and JsonAnyGetter/JsonAnySetter for collecting unknown properties.
It was not obvious that JsonUnwrapped and JsonAnyGetter/JsonAnySetter would interact like this!