Jackson JsonMappingException: Can not deserialize instance

前端 未结 4 1591
一个人的身影
一个人的身影 2021-01-12 11:18

I\'m trying to convert my json data to a POJO object using Jackson. Here is the MainActivity and my POJO class code. I\'m basically getting a JsonMappingException error. I h

4条回答
  •  孤城傲影
    2021-01-12 11:52

    Just put the data inside the [] rather than {} and it will work.

    For example:

    [
        {
            "id": "1",
            "name":"exemple"
        }
    ]
    

提交回复
热议问题