前提是String的格式是map或json类型的
String 转Json
JSONObject jasonObject = JSONObject.fromObject(str);
String 转Map
JSONObject jasonObject = JSONObject.fromObject(str);
Map map = (Map)jasonObject;
Json,String,Map之间的转换
最新推荐文章于 2024-03-08 11:25:42 发布
前提是String的格式是map或json类型的
String 转Json
JSONObject jasonObject = JSONObject.fromObject(str);
String 转Map
JSONObject jasonObject = JSONObject.fromObject(str);
Map map = (Map)jasonObject;