Passing context to custom serializer through ObjectMapper #252
-
I have an annotation that uses a custom serializer:
And the serializer:
I only want the serializer to replace the I tried:
and in the serializer:
but Is there a way to pass context to a serializer through the ObjectMapper at the time of serialization? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You are missing an obvious access pattern:
for some reason. Try that instead. |
Beta Was this translation helpful? Give feedback.
-
I must be missing something on the other side for setting the attribute.
Neither worked. |
Beta Was this translation helpful? Give feedback.
You are missing an obvious access pattern:
for some reason. Try that instead.