Jackson 3rd Party Class With No Default Constructor

前端 未结 1 1785
伪装坚强ぢ
伪装坚强ぢ 2020-11-30 11:03

I\'m trying to use Jackson to read/write my POJOs to/from Json. As of right now, I\'ve got it configured and working for my classes, except for a 3rd party class. When tryin

相关标签:
1条回答
  • 2020-11-30 11:18

    You could make use of Jackson's Mix-Ins feature, coupled with the Creator feature. The Mix-Ins feature alleviates the need to annotate the original third-party code, and the Creator feature provides a mechanism for custom instance creation.

    For yet more customization, it's not too involved to write a custom deserializer.

    0 讨论(0)
提交回复
热议问题