怎么用json转list的集合对象
怎么用json转list的集合对象?
String jstr="{json:jsonvalue,bool:true,int:1,double:20.5}" JSONObject json=JSONObject.fromObject(jstr)boolean bool=json.getBoolean("bool")int i=json.getInt("int")double d=json.getDouble("double") String value=json.getString("json") System.out.println("bool=" String.valueOf(bool) "\tjson=" value "\tint=" i "\tdouble=" d)