JSONArray dataList = new JSONArray();
这儿省略dataList 加数据的过程
dataList = new JSONArray(dataList.stream().distinct().collect(Collectors.toList()));
Set<String> timestamps = new HashSet<>();
根据时间字段去重
dataList = dataList.stream()
.map(obj -> (JSONObject) obj)
.filter(item -> timestamps.add(item.getString("Time")))
.collect(Collectors.toCollection(JSONArray::new));