try {
Gson gson = new Gson();
Map<String, String> rtMap = gson.fromJson(json,new TypeToken<Map<String,String>>() {}.getType());
return rtMap;
} catch (Exception e) {
logger.error("格式化Json异常", e);
return null;
}
Gson将json转成map
点赞
收藏