Gson之map解析
需求:
把json字符串解析成map
实现:
Gson gson = new GsonBuilder().enableComplexMapKeySerialization() .create(); String param = "xxxxxxx"; Map<String, Map<String, List<MpAppInfo>>> inParams = gson.fromJson( param, new TypeToken<Map<String, Map<String, List<MpAppInfo>>>>() { }.getType());
解决了泛型和key-value序列化
相关推荐
SXIAOYI 2020-09-16
xiaonuoyal 2020-06-17
SXIAOYI 2020-06-11
yinbaoshiguang 2020-06-09
Chydar 2020-06-02
nalanrumeng 2020-06-01
xiaonuoyal 2020-06-01
nalanrumeng 2020-05-19
ITprivate 2020-04-15
xiaonuoyal 2020-04-14
ITprivate 2020-03-26
ITprivate 2020-02-12
nalanrumeng 2020-01-13
xiaonuoyal 2019-12-07
xiaonuoyal 2019-11-18
TOmyhonour 2019-11-16