当前位置:网站首页>Gson fastjason Jackson of object to JSON difference modifies the field name
Gson fastjason Jackson of object to JSON difference modifies the field name
2022-04-23 18:10:00 【dawnsun001】
Entity Bean:
package .....; import java.io.Serializable; public class BeanVO implements Serializable { private String id; private String GPSDetail; public BeanVO() { } ..........get&set......................... }
Perform test methods :
public static void main(String[] args) {
BeanVO ff = new BeanVO();
ff.setGPSDetail("1");
System.out.println("--fastjson-"+JSONObject.toJSONString(ff));
System.out.println("--jackson-"+JsonSupport.object2Json(ff));
System.out.println("--gson-"+new Gson().toJson(ff));
}
result :
--fastjson-{"gPSDetail":"1"}
--jackson-{"gpsDetail":"1"}
--gson-{"GPSDetail":"1"}
版权声明
本文为[dawnsun001]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230544289193.html
边栏推荐
- 7-21 wrong questions involve knowledge points.
- Docker 安裝 Redis
- re正则表达式
- Rust: the output information of println is displayed during the unit test
- 登录和发布文章功能测试
- MySQL_ 01_ Simple data retrieval
- 【ACM】70. 爬楼梯
- Random number generation of C #
- 纳米技术+AI赋能蛋白质组学|珞米生命科技完成近千万美元融资
- xlsxwriter. exceptions. Filecreateerror: [errno 13] permission denied
猜你喜欢
Installation du docker redis
[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)
Closure type of rust (difference between FN, fnmut and fnone)
[UDS unified diagnostic service] IV. typical diagnostic service (6) - input / output control unit (0x2F)
GDAL + ogr learning
Clion installation tutorial
k8s之实现redis一主多从动态扩缩容
Robocode tutorial 7 - Radar locking
Romance in C language
Go file operation
随机推荐
Permission management with binary
Excel opens large CSV format data
Tensorflow tensor introduction
Pyppeter crawler
Format problems encountered in word typesetting
线上怎么确定期货账户安全的?
_ FindText error
Multi thread safe reference arc of rust
Auto.js 自定义对话框
软件测试总结
xlsxwriter. exceptions. Filecreateerror: [errno 13] permission denied
Array rotation
Build openstack platform
Classification of cifar100 data set based on convolutional neural network
解决报错max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
登录和发布文章功能测试
MySQL 中的字符串函数
ROS package NMEA_ navsat_ Driver reads GPS and Beidou Positioning Information Notes
idea中安装YapiUpload 插件将api接口上传到yapi文档上
QTableWidget使用讲解