Skip to content

test(jackson2): cover concrete throwable problem deserialization#556

Open
codingkiddo wants to merge 1 commit into
zalando:mainfrom
codingkiddo:test/jackson2-concrete-problem-deserialization
Open

test(jackson2): cover concrete throwable problem deserialization#556
codingkiddo wants to merge 1 commit into
zalando:mainfrom
codingkiddo:test/jackson2-concrete-problem-deserialization

Conversation

@codingkiddo
Copy link
Copy Markdown

Summary

This clarifies how to deserialize directly into a concrete custom subtype of AbstractThrowableProblem with Jackson 2.

When Jackson reads such a subtype directly, the problem type URI may otherwise be interpreted as a polymorphic subtype id, which can lead to an InvalidTypeIdException.

Changes

  • Add a Jackson 2 test covering direct deserialization of a concrete AbstractThrowableProblem subtype
  • Add a test fixture demonstrating the use of @JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
  • Document this pattern in the README for custom concrete subtype deserialization

Verification

mvn clean verify

Related

Relates to #485

Signed-off-by: Vinod Kumar <codingkiddo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant