I am not able to convert a JSON Array into a GroupModel
array. Below is the JSON I used:
[{
\"description\":\"My expense to others\",
\"items\"
[{
"description":"My expense to others",
"items":["aaa","bbb"],
"name":"My Expense"
},
{
"description":"My expense to others","
items":["aaa","bbb"],
"name":"My Expense"
}]
Kotlin Code
val gson = GsonBuilder().create()
val Model= gson.fromJson(body,Array::class.java).toList()
Gradle
implementation 'com.google.code.gson:gson:2.8.5'