public class FastjsonSimpleFilter extends Object implements com.alibaba.fastjson.serializer.PropertyPreFilter, com.alibaba.fastjson.parser.deserializer.ExtraProcessor, com.alibaba.fastjson.serializer.PropertyFilter
| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
excludeObjectClassName |
protected String[] |
excludeObjectNames |
protected List<com.mg.framework.log.FastjsonSimpleFilter.Relation> |
relations |
| 构造器和说明 |
|---|
FastjsonSimpleFilter() |
FastjsonSimpleFilter(String inputFilterPropertyNames)
传入需要过滤的类和属性
|
FastjsonSimpleFilter(String[] inputFilterPropertyNames)
传入需要过滤的类和属性
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
apply(com.alibaba.fastjson.serializer.JSONSerializer serializer,
Object object,
String name)
过滤延迟加载等不需要被序列化的属性,主要是应用于Hibernate的代理和管理。
|
boolean |
apply(Object object,
String name,
Object value) |
protected boolean |
isMatchExcludeObjectAndName(Object object,
String name) |
void |
processExtra(Object object,
String key,
Object value)
下划线格式字符串转换成驼峰格式字符串
|
protected String[] excludeObjectNames
protected List<com.mg.framework.log.FastjsonSimpleFilter.Relation> relations
protected String excludeObjectClassName
public FastjsonSimpleFilter()
public FastjsonSimpleFilter(String inputFilterPropertyNames)
inputFilterPropertyNames - 用分号分隔的多个字符串。
class.preoperty或直接propertyName,property看开始,class看末尾,如ItemEntity.belongpublic FastjsonSimpleFilter(String[] inputFilterPropertyNames)
inputFilterPropertyNames - class.preoperty或直接propertyName,property看开始,class看末尾,如ItemEntity.belongpublic boolean apply(com.alibaba.fastjson.serializer.JSONSerializer serializer,
Object object,
String name)
apply 在接口中 com.alibaba.fastjson.serializer.PropertyPreFilterobject - 属性所在的对象name - 属性名
// * @param value 属性值protected boolean isMatchExcludeObjectAndName(Object object, String name)
public void processExtra(Object object, String key, Object value)
processExtra 在接口中 com.alibaba.fastjson.parser.deserializer.ExtraProcessorobject - key - value - Copyright © 2018. All rights reserved.