将Java对象转换为Json对象

JSONObject json = JSONObject.fromObject(userInfo);//将java对象转换为json对象
String str = json.toString();//将json对象转换为字符串


猜你喜欢

转载自blog.csdn.net/qq_17497931/article/details/80431179