java - how to parse a JSON string into ObjectNode in Jackson? -


First of all, can anyone explain, what is the difference between the object node and the jesenand, and where did they use it?

Then what can I do if I want to convert a JSON string to ObjectNode?

You can:

  object mapper mapper = new object On mapper (); JsonNode realObj = mapper.valueToTree ("{\" k1 \ ": \" v1 \ "}")  

JsonNode is a super class of this object node.

You can find differences in the API.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -