GPT-4o via Duck.ai suggested that I could fix this using SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS. Surprisingly, this seems to work.
However, this has the disturbing implication that JsonUnwrapped is causing Jackson to collect properties into a Map before serializing them. Seems bad for performance.
Fortunately, this code doesn't execute very often, so this slowdown isn't show-stopping.
However, this has the disturbing implication that JsonUnwrapped is causing Jackson to collect properties into a Map before serializing them. Seems bad for performance.
Fortunately, this code doesn't execute very often, so this slowdown isn't show-stopping.