Jackson: is there a way to serialize POJOs directly to treemodel?

前端 未结 1 819
南笙
南笙 2020-12-15 03:10

I\'m looking for a way to directly convert some POJO to a Jackson TreeModel. I know that a translation from POJO-to-JSON-String exists, and TreeModel-to-JSON-String is suppo

相关标签:
1条回答
  • 2020-12-15 04:05

    to answer my own question:

    JsonNode node = objectMapper.valueToTree(map);
    
    0 讨论(0)
提交回复
热议问题