NutzCN Logo
问答 json格式文件的解析
发布于 2953天前 作者 Rekoe 1780 次浏览 复制 上一个帖子 下一个帖子
标签:
{"command":"actLevelIsAbove","conditions":[{"lev":0,"actType":0,"commond":"actLevelIsAbove","rewards":[{"exp":100,"type":0}]}]}

我怎么得到 conditions 值得这个List 通过Map

3 回复

通过

String str = map.getString("conditions");

方法后 List 没有了

        String json = ...
        NutMap map = Json.fromJson(NutMap.class, json);
        System.out.println(Json.toJson(map.getArray("conditions", NutMap.class)));

添加回复
请先登陆
回到顶部