当前位置:网站首页>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);
//后续处理
边栏推荐
- 17.13 supplementary knowledge, thread pool discussion, quantity discussion and summary
- MySQL add column failed because there was data before, not null by default
- Distributed Architecture Overview
- 【万字总结】以终为始,详细分析高考志愿该怎么填
- 数字签名标准(DSS)
- ZCMU--1367: Data Structure
- 我想知道,我在肇庆,到哪里开户比较好?网上开户是否安全么?
- Troubleshooting ideas that can solve 80% of faults!
- transforms. The input of randomcrop() can only be PIL image, not tensor
- SIGIR 2022 | University of Hong Kong and others proposed the application of hypergraph comparative learning in Recommendation System
猜你喜欢
小程序设置按钮分享功能
深入理解MySQL锁与事务隔离级别
Various types of gypsum PBR multi-channel mapping materials, please collect them quickly!
LeetCode——226. 翻轉二叉樹(BFS)
Runtimeerror: CUDA error: out of memory own solution (it is estimated that it is not applicable to most people in special circumstances)
【万字总结】以终为始,详细分析高考志愿该怎么填
一起备战蓝桥杯与CCF-CSP之大模拟炉石传说
Rich professional product lines, and Jiangling Ford Lingrui · Jijing version is listed
pycharm的plt.show()如何保持不关闭
Decision tree and random forest
随机推荐
Live broadcast preview | how can programmers improve R & D efficiency? On the evening of June 21, the video number and station B will broadcast live at the same time. See you or leave!
[buuctf.reverse] 126-130
【Unity】在Unity中使用C#执行外部文件,如.exe或者.bat
Vue--vuerouter cache routing component
Li Kou daily question - day 28 -566 Reshape matrix
17.13 supplementary knowledge, thread pool discussion, quantity discussion and summary
Problems encountered this week
物联网协议的王者:MQTT
wechat_微信小程序中解决navigator进行页面跳转并传递参数问题
[QNX] Command
JS 常用正则表达式
【代码随想录-动态规划】T583、两个字符串的删除操作
Static registration and dynamic registration of JNI
RSA concept explanation and tool recommendation - LMN
【QNX】命令
Vscode usage - Remote SSH configuration description
ACL 2022 | zero sample multilingual extracted text summarization based on neural label search
[buuctf.reverse] 126-130
MySQL add column failed because there was data before, not null by default
Here comes the hero League full skin Downloader