Make Jackson Subtypes extensible without editing the Supertypes java-file
问题 In my company we have a fixed JSON message structure: { "headerVal1": "" "headerVal2": "" "customPayload": { "payloadType":"" } } I would like to have some kind of library, which allows me, to not care for the company defined message structure, and instead just send and receive the payload. My idea was, to define the structure of the company template as one object, and use subtypes of a PayloadObject . @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.MINIMAL_CLASS,