当前位置:网站首页>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
边栏推荐
猜你喜欢
Solving the problem of displaying too many unique values in ArcGIS partition statistics failed
[UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)
Visualization of residential house prices
.104History
Re regular expression
Win1远程出现“这可能是由于credssp加密oracle修正”解决办法
Implementation of k8s redis one master multi slave dynamic capacity expansion
Nat commun | current progress and open challenges of applied deep learning in Bioscience
Re expression régulière
Vulnérabilité d'exécution de la commande de fond du panneau de commande JD - freefuck
随机推荐
Docker 安装 Redis
Robocode tutorial 3 - Robo machine analysis
C# 网络相关操作
Batch export ArcGIS attribute table
Queue solving Joseph problem
Array rotation
Implementation of image recognition code based on VGg convolutional neural network
According to the result set queried by SQL statement, it is encapsulated as JSON
Romance in C language
Docker installation MySQL
Install pyshp Library
The difference between deep copy and shallow copy
解决报错max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
C language array processing batch data
C byte array (byte []) and string are converted to each other
Operators in C language
Crawl the product data of cicada mother data platform
C language input and output (printf and scanf functions, putchar and getchar functions)
RC smart pointer in rust
【ACM】70. 爬楼梯