Json笔记

来源:互联网 发布:淘宝店无线端装修 编辑:程序博客网 时间:2024/05/14 02:46

alibaba的fastJson用法

1.Entity转Map对象(Json强转为Map)

Map<String,String> json= (Map<String, String>) JSONObject.toJSON(Entity);

2.Entity转json对象(Json强转为JSONObject)

(JSONObject)JSONObject.toJSON(Entity);

0 0
原创粉丝点击