tarmogoyf

Jackson_1

Oct 20th, 2023
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. @JsonTypeInfo(
  2. use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type")
  3. @JsonSubTypes(value = {
  4. @JsonSubTypes.Type(value = A.class, name = "type_a"),
  5. @JsonSubTypes.Type(value = B.class, name = "type_b")
  6. })
  7. @JsonInclude(JsonInclude.Include.NON_NULL)
Advertisement
Add Comment
Please, Sign In to add comment