- for serialize
implement one class to simple name or tag filter such as:
public interface TypeFilter extends SerializeFilter {
String process(Class<?> type, String name);
}
- for parser
need class name process to translate class name to Class helping with TypeFilter of serializer
public interface TypeProcessor extends ParseProcess {
Class<?> process(ParseContext[] context, int size, String typeName, Type expectClass);
}
and NameProcessor for field name processing to match java bean field name (serializer has NameFilter)
public interface NameProcessor extends ParseProcess {
//only process complex or abnormal property
Object process(ParseContext[] context, int size, Object fieldName);
}
or better suggestion , thx
making distribute rpc/rest service easier & compatible in multiple languages
2条答案
按热度按时间wpx232ag1#
very good idea, i will add these features in the next version.
wnrlj8wa2#
for TypeFilter , does the class level SerializeFilter meet you needs?
https://github.com/alibaba/fastjson/wiki/Class_Level_SerializeFilter