把 json 数据中 key 全部转换为大写

public List> upperCaseList(List> beforMapList) {
List> resultList = new ArrayList>();
if (!CollectionUtils.isEmpty(beforMapList)) {
Map resultMap = null;
for (Map beforMap : beforMapList) {
resultMap = new HashMap();
for (String key : beforMap.keySet()) {
resultMap.put(key.toUpperCase(), beforMap.get(key));
}
resultList.add(resultMap);
}
}
return resultList;
}

你可能感兴趣的:(把 json 数据中 key 全部转换为大写)