赞
踩
- //利用fastjson进行反序列化
- public <T> T getData(TypeReference<T> typeReference) {
- Object data = get("data"); //默认是map
- String jsonString = JSON.toJSONString(data);
- T t = JSON.parseObject(jsonString, typeReference);
- return t;
- }
-
-
-
- public R setData(Object data) {
- put("data",data);
- return this;
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。