本文整理了Java中flexjson.JSONSerializer.transform()
方法的一些代码示例,展示了JSONSerializer.transform()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONSerializer.transform()
方法的具体详情如下:
包路径:flexjson.JSONSerializer
类名称:JSONSerializer
方法名:transform
[英]This adds a Transformer used to manipulate the value of all fields that match the type.
[中]这将添加一个转换器,用于操作与该类型匹配的所有字段的值。
代码示例来源:origin: dragome/dragome-sdk
public void addTransformer(Transformer transformer, Class<?>... types)
{
jsonSerializer.transform(transformer, types);
}
代码示例来源:origin: forcelate/forcelate-benchmarks
@PostConstruct
public void init() {
serializer.transform(DF, Date.class);
}
代码示例来源:origin: dragome/dragome-sdk
private JSONSerializer createSerializer()
{
jsonSerializer= new JSONSerializer();
jsonSerializer.transform(new ElementTrasformer(), Element.class);
jsonSerializer.transform(new MethodTrasformer(), Method.class);
jsonSerializer.transform(new DragomeClassTransformer(), Class.class);
return jsonSerializer;
}
代码示例来源:origin: com.googlecode.mycontainer/mycontainer-commons
public JsonHandler() {
this.serializer = new JSONSerializer();
deserializer = new JSONDeserializer<Object>();
serializer.transform(new CharacterTransformer(), CharSequence.class);
serializer.transform(new IterableTransformer(), List.class);
serializer.transform(new MapTransformer(), Map.class);
}
内容来源于网络,如有侵权,请联系作者删除!