Gson: Expected begin_array but was STRING

后端 未结 1 1513
暗喜
暗喜 2020-12-11 04:35

I am facing the following error in parsing JSON data:

Expected begin_array but was STRING at line 1 column 34

I cannot find a solution. My JSON is the follow

相关标签:
1条回答
  • 2020-12-11 05:10

    the error is in the json you receive: you class expects an array because

     List<Person> records;
    

    but then in your json you have

    "records":"[

    it has to be :

    "records": [
    

    and at the end ]"}, has to be

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