JSON
[
{
"id": 1,
"name": "product new"
},
{
"id": 2,
"name": "test12345"
},
{
"id": 3,
"name": "product new"
}
]
Java
ArrayList<Product> products
products = new Gson().fromJson(result.toString(), ArrayList<Product>.getClass());
how can I convert the JSON array to Product class based ArrayList?