当前位置:网站首页>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
边栏推荐
- Installation du docker redis
- Tensorflow tensor introduction
- Docker 安装 Redis
- Crack sliding verification code
- C language to achieve 2048 small game direction merging logic
- Docker 安装 MySQL
- mysql自动启动设置用Systemctl start mysqld启动
- Multi thread crawling Marco Polo network supplier data
- Nodejs安装
- xlsxwriter. exceptions. Filecreateerror: [errno 13] permission denied
猜你喜欢
随机推荐
Calculation of fishing net road density
Qtablewidget usage explanation
YOLOv4剪枝【附代码】
Flash operates on multiple databases
ArcGIS table to excel exceeds the upper limit, conversion failed
Crack sliding verification code
Using files to save data (C language)
QTableWidget使用讲解
How to ensure the security of futures accounts online?
.105Location
The vivado project corresponding to the board is generated by TCL script
2022 Jiangxi energy storage technology exhibition, China Battery exhibition, power battery exhibition and fuel cell Exhibition
xlsxwriter. exceptions. Filecreateerror: [errno 13] permission denied
Nat commun | current progress and open challenges of applied deep learning in Bioscience
Arcpy adds fields and loop assignments to vector data
.105Location
MySQL auto start settings start with systemctl start mysqld
word frequency count
纳米技术+AI赋能蛋白质组学|珞米生命科技完成近千万美元融资
Operators in C language