public List parseString2List(String json,Class clazz) {
    Type type = new ParameterizedTypeImpl(clazz);
    List list = new Gson().fromJson(json, type);
    return list;
    }
    private class ParameterizedTypeImpl implements ParameterizedType {
    Class clazz;

    public ParameterizedTypeImpl(Class clz) {
    clazz = clz;
    }
    @Override
    public Type[] getActualTypeArguments() {
    return new Type[]{clazz};
    }
    @Override
    public Type getRawType() {
    return List.class;
    }
    @Override
    public Type getOwnerType() {
    return null;
    }
    }

    public static T gsonToBean(String jsonString, Class beanClass) {
    Gson gson = new Gson();
    T bean = gson.fromJson(jsonString, beanClass);
    return bean;
    }

    1. public static <T> List<T> gsonToBeanList(String jsonString, Class clazz) {
    2. Gson gson = new Gson();
    3. Type type = new ParameterizedTypeImpl(clazz);
    4. List<T> list = gson.fromJson(jsonString, type);
    5. return list;
    6. }
    7. public static <T> List<T> gsonToBeanList(String jsonString, Type type) {
    8. Gson gson = new Gson();
    9. List<T> list = gson.fromJson(jsonString, type);
    10. return list;
    11. }