赞
踩
Gson解析错误,不可以直接解析,用下面的方法即可
Gson gson = new Gson();
JsonReader reader = new JsonReader(new StringReader(result));
reader.setLenient(true);
BaseEntity<Entity, String> entity = gson.fromJson(reader, new TypeToken<BaseEntity<Entity, String>>() {}.getType());
return entity;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。