当前位置:网站首页>Fastjason filter field
Fastjason filter field
2022-06-28 09:06:00 【Try Yi yisiwei】
1、 Add... Before the corresponding field of the object transient, Indicates that the field does not need to be serialized , It's generating json This field will not be included when the .
such as
private transient String name;
- 1.
2、 Annotate the object response field , Generated in this way json Also does not contain this field .
@JSONField(serialize=false)
private String name;
- 1.
- 2.
3. The specified field can be displayed
SimplePropertyPreFilter filter = new SimplePropertyPreFilter(
MpBannerEntity.class, "title", "thumbUrl", "url");
JSONObject.toJSONString( Objects to filter ,
filter)
- 1.
- 2.
- 3.
- 4.
4: Filter specified fields
final String[] arr = new String[] { "ticketNo", "status", "updateTime",
"createTime" };
PropertyFilter propertyFilter = new PropertyFilter() {
public boolean apply(Object object, String name, Object value) {
for (String string : arr) {
if (name.equalsIgnoreCase(string)) {
return false;// To filter out
}
}
return true;// No filtering
}
};
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
边栏推荐
- Discussion on safety management of centralized maintenance construction site of substation under the mode of operation and maintenance
- Application of current limiting protector in preventing electrical fire in shopping malls
- [untitled]
- 小程序 :遍历list里面的某个数组的值,等同于 for=“list” list.comment里面的某一项
- The Falling Leaves
- 从知识到智慧:知识图谱还要走多远?
- 我想网上注册股票开户,如何操作?在线开户安全么?
- Is it safe for CICC fortune to open an account? How much do you charge?
- 使用transform:scale之后导致页面鼠标悬浮事件消失
- 个人究竟如何开户炒股?在线开户安全么?
猜你喜欢

Installation of containerd1.5.5

Calcul des frais d'achat et de vente d'actions

Discussion on the practice of fire emergency lighting system in the field of building electrical design

Valentine's Day - VBS learning (sentences, love words)
Understanding the IO model

Postman interface test

基于宽表的数据建模
![[big case] Xuecheng online website](/img/40/beec3ba567f5a372899bb58af0d05a.png)
[big case] Xuecheng online website

How to suppress SiC MOSFET crosstalk?

股票 停牌
随机推荐
Zhejiang energy online monitoring and management system
Application of current limiting protector in preventing electrical fire in shopping malls
How do individuals open accounts to speculate in stocks? Is online account opening safe?
Boundary value analysis method for learning basic content of software testing (2)
手机买同业存单基金开户选哪家证券公司比较好,比较安全呢
Music website design based on harmonyos (portal page)
[.Net6] GRP server and client development cases, as well as the access efficiency duel between the minimum API service, GRP service and traditional webapi service
spark的资源调度和任务调度
批量修改表和表中字段排序规则
Fire safety hazards
DEJA_VU3D - Cesium功能集 之 051-地形开挖完美实现
Mysql8.0 forgot the root password
Common tools for interface testing --postman
How to implement two factor authentication MFA based on RADIUS protocol?
Error: `brew cask` is no longer a `brew` command. Use `brew <command> --cask` instead.
个人究竟如何开户炒股?在线开户安全么?
Chrome devtools
Discussion on the improvement and application of the prepayment system in the management of electricity charge and price
Data mining modeling practice
A - deep sea exploration