jackson deserialization json to java-objects

前端 未结 4 812
时光取名叫无心
时光取名叫无心 2020-12-09 08:18

Here is my Java code which is used for the de-serialization, i am trying to convert json string into java object. In doing so i have used the following code:



        
4条回答
  •  失恋的感觉
    2020-12-09 08:58

    Your product class needs a parameterless constructor. You can make it private, but Jackson needs the constructor.

    As a side note: You should use Pascal casing for your class names. That is Product, and not product.

提交回复
热议问题