Replies: 2 comments 10 replies
-
From the link you gave.
…On Sat, Oct 19, 2024 at 5:27 PM Kim, Joo Hyuk ***@***.***> wrote:
May I ask where u got I think the information on how the annotation should
behave?.
Please refer to the actual documentation of JsonMerge
<https://www.javadoc.io/doc/com.fasterxml.jackson.core/jackson-annotations/latest/com/fasterxml/jackson/annotation/JsonMerge.html>
which tells you how it should behave.
—
Reply to this email directly, view it on GitHub
<#4756 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI5QOM463XWRWVPPI5KVQEDZ4JT6XAVCNFSM6AAAAABQHK2A2SVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOJZGE2DOMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
9 replies
-
Submitted #4783. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(Copied from the mailing list)
My class contains an initialized custom collection
where
MyList
is aj.u.List
. When deserializing, I get an exception saying that there is no known deserializer forMyList
("Cannot find a deserializer for non-concrete List type"), which is generally understandable, but I already initialized it, so there's no need for one. Instead, I just want to add the items to the list.To demonstrate, I can add a private setter inside the class:
this works, but I don't think it should be needed. Specifically, Jackson should not create any list. It needs to deserialize the values of the items anyway; then instead of creating a list, add them to the existing one. It's a
List
, so it should know to call 'add' ('put' for map).I know there is
@JsonMerge
, and I thought that that's what I needed:but just adding it to the field doesn't work, I still get the same exception. Am I not understanding
@JsonMerge
or am I doing something wrong?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions