使用Jackson ObjectMapper.readValue()将JSON字符串读入java对象。
ObjectMapper.readValue()
特定的java类没有默认构造函数,也不能编辑,即不能添加注释@JSONCreator或@JSONProperty。因此得到了异常no suitable constructor found for type。
@JSONCreator
@JSONProperty
no suitable constructor found for type
如何解决这个问题?
https://stackoverflow.com/questions/38139614
相似问题