Skip to content

globally configure Json type id? #185

Answered by cowtowncoder
hidao asked this question in Q&A
Discussion options

You must be logged in to vote

Jackson does NOT by default include any type id -- these are only added if @JsonTypeInfo annotation is added to the base class OR "default typing" is enabled.
Use of default typing is discouraged: it should not be used unless one really knows what they are doing.
I am guessing you are enabling that for some reason: it is better not to do that and add explicit @JsonTypeInfo where type id is needed.

Aside from that, example seems to use Lombok which adds its own possible complications. I am not quite sure what exactly is being asked here th0.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@hidao
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@hidao
Comment options

@JooHyukKim
Comment options

Answer selected by JooHyukKim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants