当前位置:网站首页>Map和List<Map>转相应的对象
Map和List<Map>转相应的对象
2022-06-26 17:54:00 【 时光清浅ぴ许你安然】
引入对应jar包
<fastjson.version>1.2.73</fastjson.version>
Map转对象
Map<String, Object> data = formData.get("empData");
String empDataJson = JSONObject.toJSONString(data);
if (ToolUtil.isNotEmpty(empDataJson)) {
EmpTest empTest = JSONObject.parseObject(empDataJson, EmpTest.class);
//后续处理
}
List<Map>转List<Object>
List<Map<String, Object>> empMapList = formData.get("empList");
List<EmpTest> empList = JSONArray.parseArray(JSONArray.toJSONString(empMapList), EmpTest.class);
//后续处理
边栏推荐
- 陈强:阿里千亿级大规模数字商业知识图谱助力业务增长
- [npoi] C copy sheet template across workbooks to export Excel
- wechat_ Solve the problem of page Jump and parameter transfer by navigator in wechat applet
- 清华&商汤&上海AI&CUHK提出Siamese Image Modeling,兼具linear probing和密集预测性能!
- MySQL的MVCC机制详解
- JS common regular expressions
- 并发之线程安全
- Number of solutions for knapsack problem
- idea中文插件chinese(simplified) language pack
- Binary search-1
猜你喜欢

mysql Add column 失败 因为之前有数据,不是默认null 不行

transforms. The input of randomcrop() can only be PIL image, not tensor

vutils. make_ A little experience of grid () in relation to black and white images

The king of Internet of things protocol: mqtt

牛客网:设计LRU缓存结构 设计LFU缓存结构

RSA概念详解及工具推荐大全 - lmn

数字签名论述及生成与优点分析

ACL 2022 | zero sample multilingual extracted text summarization based on neural label search

RSA加密解密详解

并发之Synchronized说明
随机推荐
RSA concept explanation and tool recommendation - LMN
Detailed explanation of browser storage methods: the origin and difference of cookies, localstorage and sessionstorage
Uncover the secret of Agora lipsync Technology: driving portraits to simulate human speech through real-time voice
Distributed Architecture Overview
QPushButton 样式使用示例(以及按钮setmenu添加下拉菜单的方法)
JNI的 静态注册与动态注册
行锁分析和死锁
DoS及攻擊方法詳解
vue--vuerouter缓存路由组件
How to open a stock account? Is it safe to open an account online now?
你好,现在网上股票开户买股票安全吗?
Prometeus 2.34.0 新特性
[recommendation system learning] recommendation system architecture
#26class中get和set设置
Problems encountered this week
MySQL add column failed because there was data before, not null by default
Here comes the hero League full skin Downloader
同花顺开户怎么样安全吗?怎么炒股开户
Comp281 explanation
数字签名论述及生成与优点分析