First of all could anyone explain to me What are differences between ObjectNode and JsonNode, and where they used?
Then if I want to convert a JSON string into ObjectNode what can I do?
First of all could anyone explain to me What are differences between ObjectNode and JsonNode, and where they used?
Then if I want to convert a JSON string into ObjectNode what can I do?
You can do:
ObjectMapper mapper = new ObjectMapper();
JsonNode actualObj = mapper.valueToTree("{\"k1\":\"v1\"}")
JsonNode it is a super class of ObjectNode.
You can find the differences in the API.