当前位置:网站首页>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 the improvement and application of the prepayment system in the management of electricity charge and price
- Which is a better ERP management system for electronic component sales?
- Comment supprimer le crosstalk SiC MOSFET?
- 【无标题】
- 中金财富开户安全吗?怎么收费?
- Implementation of single sign on
- Loggerfactory uses log4j Parameter introduction of properties
- [.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
- How do individuals open accounts to speculate in stocks? Is online account opening safe?
- Installation of containerd1.5.5
猜你喜欢

硬盘基本知识(磁头、磁道、扇区、柱面)

Common tools for interface testing --postman

电子元器件销售ERP管理系统哪个比较好?

High rise building fire prevention

Error: `brew cask` is no longer a `brew` command. Use `brew <command> --cask` instead.

Almost union find (weighted union search)

redis5.0的槽点迁移,随意玩(单机迁移集群)

Which is a better ERP management system for electronic component sales?

RMAN backup message ora-19809 ora-19804

SQL optimization experience: from 30248 seconds to 0.001 seconds
随机推荐
Boundary value analysis method for learning basic content of software testing (2)
From knowledge to wisdom: how far will the knowledge map go?
Data mining modeling practice
Apiccloud, together with 360 Tianyu, helps enterprises keep the "first pass" of APP security
Installation of containerd1.5.5
Apache Doris 成为 Apache 顶级项目
MATLAB小技巧(20)矩阵分析--主成分回归
Container adapter - stack: stack queue: queue priority_ Queue: priority queue
Trailing Zeroes (II)
Basic content learning of software testing (I)
Play SFTP upload file
Resource scheduling and task scheduling of spark
[untitled]
Basic knowledge of hard disk (head, track, sector, cylinder)
買賣股票費用計算
Goldbach`s Conjecture
Android studio interview preparation
How to suppress SiC MOSFET crosstalk?
Application of energy management system in iron and steel enterprises
Test cases for learning the basic content of software testing (II)