HashMap to Objects with Childs #197
Unanswered
kenan-kajkus
asked this question in
Q&A
Replies: 1 comment
-
In general usage questions are better asked on Google groups: https://groups.google.com/g/jackson-user so we don't have hundreds of "discussions" that are just usage questions. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hello there,
For example I have two Classes.
Class Entry{
@JsonProperty("xName")
String Name;
Sender sender
}
Class Sender{
@JsonProperty("senderName")
String Name;
}
Now I want to use a HashMap
HashMap<String,Object> properties = new HashMap<>();
properties.put("xName", "TestEntryName");
properties.put("senderName", "TestSenderName");
ObjectMapper mapper = new ObejctMapper();
Entry entry =mapper.convertValue(properties, Entry.class);
Is this possible and how to configure this
Beta Was this translation helpful? Give feedback.
All reactions