How to convert JsonNode to ObjectNode

前端 未结 4 1767
误落风尘
误落风尘 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:38

    I try it some times, it will be ok! You only define a Student Class to map the properties. Then you could convert the jsonNode to Student Object.

    Student student = objectMapper.convertValue(jsonNode1, Student.class);

    I think this will be suitable for your need!

提交回复
热议问题