当前位置:首页>开发>正文

怎么用json转list的集合对象

2023-09-08 08:46:26 互联网 未知 开发

怎么用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)

最新文章

随便看看