当前位置:网站首页>[party benefits] jsonobject to string, leave blank
[party benefits] jsonobject to string, leave blank
2022-07-01 03:39:00 【Three person studio】
The same problem :
Redis Leave an empty field and take it out
JSONObject To String Leave blank fields when typing
take String Type to JSONObject Leave blank fields when typing
reason
Object The type and JSONObject Type to String When type , Empty fields are automatically ignored .
Solution
Use class Entity classes are output as templates , take String Type to entity type
Need to introduce hutool
import cn.hutool.json.JSONUtil;
...
UserInfo userinfo = JSONUtil.toBean(String.valueOf(redisUtil.get(UserToken)),UserInfo.class)
UserInfo.java
import lombok.Data;
// Virtual entity class that outputs user information
@Data
public class UserInfo {
private String id;
private String username;
private String realname;
}
Then through the entity class get and set Just output .
边栏推荐
- pytorch nn.AdaptiveAvgPool2d(1)
- Pytorch training deep learning network settings CUDA specified GPU visible
- Pyramid scene parsing network [pspnet] thesis reading
- ECMAScript 6.0
- How do I use Google Chrome 11's Upload Folder feature in my own code?
- 终极套娃 2.0 | 云原生交付的封装
- Keil5中如何做到 0 Error(s), 0 Warning(s).
- 5. [WebGIS practice] software operation - service release and permission management
- 快速筛选打卡时间日期等数据:EXCEL筛选查找某一时间点是否在某一时间段内
- Split(), split(), slice(), can't you tell?
猜你喜欢

快速筛选打卡时间日期等数据:EXCEL筛选查找某一时间点是否在某一时间段内

Bilinear upsampling and f.upsample in pytorch_ bilinear

IPv4 and IPv6, LAN and WAN, gateway, public IP and private IP, IP address, subnet mask, network segment, network number, host number, network address, host address, and IP segment / number - what does

数据交换 JSON

MFC窗口滚动条用法

Leetcode 31 next spread, leetcode 64 minimum path sum, leetcode 62 different paths, leetcode 78 subset, leetcode 33 search rotation sort array (modify dichotomy)

RSN:Learning to Exploit Long-term Relational Dependencies in Knowledge Graphs

Cookie&Session

IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?

pytorch中的双线性插值上采样(Bilinear Upsampling)、F.upsample_bilinear
随机推荐
[reading notes] copywriting realization -- four golden steps for writing effective copywriting
Take you through a circuit board, from design to production (dry goods)
岭回归和lasso回归
JS日常开发小技巧(持续更新)
IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?
Appium自动化测试基础--补充:C/S架构和B/S架构说明
还在浪费脑细胞自学吗,这份面试笔记绝对是C站天花板
How to achieve 0 error (s) and 0 warning (s) in keil5
Leetcode:829. 连续整数求和
ECMAScript 6.0
Home online shopping project
Design of serial port receiving data scheme
[small sample segmentation] interpretation of the paper: prior guided feature enrichment network for fee shot segmentation
打包iso文件的话,怎样使用hybrid格式输出?isohybrid:command not found
线程数据共享和安全 -ThreadLocal
监听器 Listener
Pyramid Scene Parsing Network【PSPNet】论文阅读
MFC窗口滚动条用法
Use of comment keyword in database
服务器渲染技术jsp