Deserialize a T from a T ("identity" deserialization)?
#105
Replies: 3 comments 1 reply
-
|
Asked too soon, I see this works with a default constructor. But I guess I would still like to ask if it's possible even if the target type does NOT have a default constructor, to "just use the T it has already" rather than try to reconstruct (?) it. |
Beta Was this translation helpful? Give feedback.
-
|
It should work if I understand question correctly -- please file an issue with specific reproduction (ideally unit test) on And as least that'd show what I missed here if nothing else (wrt what exactly is desired). |
Beta Was this translation helpful? Give feedback.
-
|
I think I need to read some more, thank you for your time. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering if it is possible to do the following (jackson3):
Currently I get:
tools.jackson.databind.exc.MismatchedInputException: Cannot construct instance of
Foo(although at least one Creator exists): cannot deserialize from Object value (no delegate- or property-based Creator)I was hoping to configure the mapper to say something like "I need a
There, and I have aThere, so just return theTI have, no need to deserialize it". Is that possible?Beta Was this translation helpful? Give feedback.
All reactions