public <T>JsonArray<T> createListDtoFromJson(Reader json,Class<T> dtoInterface) throws IOException {
  final DtoProvider<T> dtoProvider=getDtoProvider(dtoInterface);
  final List<JsonElement> list;
  try {
    list=gson.fromJson(json,listTypeCache.getUnchecked(JsonElement.class));
  }
 catch (  JsonSyntaxException e) {
    final Throwable cause=e.getCause();
    if (cause instanceof IOException) {
      throw (IOException)cause;
    }
    throw e;
  }
  final List<T> result=new ArrayList<>(list.size());
  for (  JsonElement e : list) {
    result.add(dtoProvider.fromJson(e));
  }
  return new JsonArrayImpl<>(result);
}

public < T > JsonArray < T > createListDtoFromJson ( Reader json , Class < T > dtoInterface ) throws IOException { final DtoProvider < T > dtoProvider = getDtoProvider ( dtoInterface ) ; final List < JsonElement > list ; try { list = gson . fromJson ( json , listTypeCache . getUnchecked ( JsonElement . class ) ) ; } catch ( JsonSyntaxException e ) { final Throwable cause = e . getCause ( ) ; if ( cause instanceof IOException ) { throw ( IOException ) cause ; } throw e ; } final List < T > result = new ArrayList < > ( list . size ( ) ) ; for ( JsonElement e : list ) { result . add ( dtoProvider . fromJson ( e ) ) ; } return new JsonArrayImpl < > ( result ) ; }
parses the json data from the specified reader into list of objects of the specified type .
