How to convert JsonNode to ObjectNode

前端 未结 4 1753
误落风尘
误落风尘 2021-02-05 03:51

I have a com.fasterxml JsonNode object with some data. I need to do some manipulation on its data. I googled for answer but didn\'t got it properly. Can you please

4条回答
  •  悲&欢浪女
    2021-02-05 04:41

    You can convert a JsonNode in an ObjectNode in this simple way:

    ObjectNode objectNode = jsonNode.deepCopy();
    

    Available from Jackson 2.0 and tested with Jackson 2.4.0

提交回复
热议问题