JSON强转 <T>任意类

来源:互联网 发布:java parcelable 编辑:程序博客网 时间:2024/05/29 03:35

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;


阿里巴巴提供的JSON类

T num= JSONObject.parseObject("String", new TypeReference<T>(){})


List<HashMap<String, Object>> list= JSONObject.parseObject("String", new TypeReference<List<HashMap<String, Object>>>(){})

原创粉丝点击