Skip to content

Apply @JsonNaming on serialization only #3971

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

You must be logged in to vote

No, unfortunately there is no way to apply @JsonNaming only on serialization; it will be used for transforming names in both directions.

Possible work-around would be to use 2 different mappers, and maybe configuring mix-in annotation for serialization case (to associate @JsonNaming on class(es).
Or using custom AnnotationIntrospector to block application of @JsonNaming for deserialization-side.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by flangam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants