当前位置:网站首页>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);
//后续处理
边栏推荐
- Introduction to distributed cache / cache cluster
- [npoi] C copy sheet template across workbooks to export Excel
- Discussion and generation of digital signature and analysis of its advantages
- 在国金证券开户怎么样?开户安全吗?
- ACL 2022 | zero sample multilingual extracted text summarization based on neural label search
- ZCMU--1367: Data Structure
- Analysis of deep security definition and encryption technology
- 无需人工先验!港大&同济&LunarAI&旷视提出基于语义分组的自监督视觉表征学习,显著提升目标检测、实例分割和语义分割任务!
- Applet setting button sharing function
- RuntimeError: CUDA error: out of memory自己的解决方法(情况比较特殊估计对大部分人不适用)
猜你喜欢
![[recommendation system learning] recommendation system architecture](/img/a8/448f6e708227555bb6b32cdc652435.png)
[recommendation system learning] recommendation system architecture

The king of Internet of things protocol: mqtt

解决pycharm里面每个字母占一格空格的问题

Here comes the hero League full skin Downloader

Leetcode - 226. Retourner l'arbre binaire (bfs)

深入理解MySQL锁与事务隔离级别

Rich professional product lines, and Jiangling Ford Lingrui · Jijing version is listed

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

Concept and working principle of data encryption standard (DES)

ACL 2022 | zero sample multilingual extracted text summarization based on neural label search
随机推荐
Concept and working principle of data encryption standard (DES)
LeetCode——226. Flip binary tree (BFS)
Dos et détails de la méthode d'attaque
股票开账户如何优惠开户?现在在线开户安全么?
MySql 导出数据库中的全部表索引
腾讯钱智明:信息流业务中的预训练方法探索与应用实践
Using redis for user access data statistics hyperloglog and bitmap advanced data types
10 cloud security best practices that enterprises need to know
Digital signature standard (DSS)
Comp281 explanation
Leetcode - 226. Retourner l'arbre binaire (bfs)
如何将应用加入到deviceidle 白名单?
14《MySQL 教程》INSERT 插入数据
数字签名论述及生成与优点分析
map和filter方法对于稀缺数组的处理
9、智慧交通项目(2)
ACL 2022 | zero sample multilingual extracted text summarization based on neural label search
sql中ROUND和TRUNCATE的区别(四舍五入还是截取小数点后几位)
Li Kou daily question - day 28 -566 Reshape matrix
vue--vuerouter缓存路由组件