Hello everyone, I have a String, and it contains an array of json, like:

[{name:Vlad,family:Smith},{name:Masha,family:Johnson}] 

I need to get an array of objects, how to do it with the gson library?

  • JSON you, by the way, is not valid. - Nofate

1 answer 1

 List<MyClass> list = gson.fromJson(jsonString, new TypeToken<List<MyClass>>(){}.getType());