String str = "[861,\"te\",[221364091,1522662008347,0.00463756,7047.2]]";
1 回答
慕森卡
TA贡献1806条经验 获得超8个赞
正常解析就可以,这是个JSONArray,用fastjson的话
代码:
String str = "[861,\"te\",[221364091,1522662008347,0.00463756,7047.2]]"; JSONArray parse = JSON.parseArray(str); System.out.println(parse.getInteger(0)); System.out.println(parse.getString(1)); System.out.println(parse.getJSONArray(2).getInteger(0)); System.out.println(parse.getJSONArray(2).getInteger(1)); System.out.println(parse.getJSONArray(2).getDouble(2)); System.out.println(parse.getJSONArray(2).getDouble(3));
输出
861 te 221364091 -2051381733 0.00463756 7047.2
添加回答
举报
0/150
提交
取消