First of all, follow Java naming conventions. Your class names should start with a capital letter. So upper camel case.
Get rid of your enclosing class, tempJSON
and use a type token in the Gson#fromJson(..)
to mark it as a List
, since you have a JSON array.
List<innerJSON> innerJSONs = gson.fromJson(yourStream, new TypeToken<List<innerJSON>>(){}.getType());
Now the List
will contain as many innerJSON
objects as appear in your JSON.