I receive the following String response from server (note the square brackets used in the values of users
):
{
"amount": 3,
"users": [
[
"username1",
"Name1"
],
[
"username2",
"Name2"
],
[
"username3",
"Name3"
]
]
}
How can I convert it to a List of User objects?? Preferably using GSON.
P.S. My User class contains fields username and name.
P.S.S. This post is NOT a duplicate for this post, since the formats of the JSON Outputs are completely different (in my case, the format is different from JSONArray fromat) and the answers to that post does not solve my problem...
Thank you!