If you see the answer there, you can notice that the first parameter in the fromJson()
method was a String
(the json object). Try to use the toString()
on the JsonArray like this:-
List<MyModel> myModelList = gson.fromJson(jsonArray.toString(), listType);