fastjson中@JSONField注解的用法
来源:互联网 发布:淘宝处罚规则 编辑:程序博客网 时间:2024/06/04 19:39
@JSONField注解的用法
@JSONField是fastjson中的一个注解。在属性头上加上这个注解中,在对对象进行json转换时,该属性,将不会参与格式化。
<span style="white-space:pre"></span>@JSONField(serialize = false)private String id;private String billCode;private String pushTarget;private String pushCategory;private String pushTime;private String subscriptionCategory;private String subscriptionSource;private String createBy;private String orderCode;private String receiver_mobile;private String sender_mobile;
@Testpublic void tes3() {SubScriptEntity sub = new SubScriptEntity();sub.setBillCode("1");sub.setCreateBy("2");sub.setId("3");sub.setOrderCode("4");sub.setPushCategory("5");String json = JSON.toJSONString(sub);System.out.println(json);}run:
{"billCode":"1","createBy":"2","orderCode":"4","pushCategory":"5"}
id并没有转换被格式化。
0 1
- fastjson中@JSONField注解的用法
- fastjson的@JSONField注解
- FastJson中@JSONField注解使用
- FastJson中@JSONField注解使用
- FastJson中@JSONField注解使用
- FastJson中@JSONField注解使用
- FastJson注解@JSONField的使用
- fastjson的@JSONField注解的一点问题
- 关于fastJSON的@JSONField
- Fastjon JSONField 注解 常见用法
- FastJson-JSONField
- fastjson JSONField注解忽略字段与格式化字段
- fastjson中SerializerFeature的用法及中文注解
- @JSONField注解
- fastjson使用 -- @JSONField使用
- fastjson之annotation.JSONField
- fastjson中@jsonType注解的使用
- fastjson使用(五) -- @JSONField使用
- exp2
- 使用BabeLua3.x在cocos2d-x中编辑和调试Lua
- win7搭建ftp
- ocp-005
- 《iOS Human Interface Guidelines》——Starting and Stopping
- fastjson中@JSONField注解的用法
- h5 localstorage 不能存true和false
- Search in Rotated Sorted Array
- 原型关系
- 【容斥原理】HDOJ GCD 1695
- BP神经网络从理论到应用(一):C++实现
- 开发smarty php 知识积累
- char数组 、char指针与字符串常量的比较
- Android Socket编程实例