码迷,mamicode.com
首页 > 其他好文 > 详细

类型转换

时间:2020-10-19 22:27:53      阅读:19      评论:0      收藏:0      [点我收藏+]

标签:tst   类型转换   hashmap   转换   reference   rgb   exception   ble   enc   

String 转 Map<String,Map<String,Double>>

String test;
Map<String,Map<String,Double>> map = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
try{
  map = mapper.readValue(tset,new TypeReference<Map<String,Map<String,Double>>>(){});
}catch(Exception e){
    e.printStackTrace();
}

 

类型转换

标签:tst   类型转换   hashmap   转换   reference   rgb   exception   ble   enc   

原文地址:https://www.cnblogs.com/yan-sh/p/13718671.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!