我想要取出一串json里面的值怎么取出来java

[{"updateDate":1649645526000,"lossId":397,"measure":"测试","isValid":1,"id":70,"createDate":1649645522000}]

list = [{"updateDate":1649645526000,"lossId":397,"measure":"测试","isValid":1,"id":70,"createDate":1649645522000}]
data = list[0]
print(data["updateDate"])

引入已经写好的包吧,gson应该是这个

用fastjson,https://blog.csdn.net/weixin_49125164/article/details/115709427

img


先取出 JSONArray jsonArray =jsonObject.getJSONArray().再取索引0的 JSONObject item=jsonArray.getJSONObject(0).再取String=item.getString().getInteger等