本文整理汇总了Java中com.alibaba.fastjson.parser.ParserConfig.getDeserializer方法的典型用法代码示例。如果您正苦于以下问题:Java ParserConfig.getDeserializer方法的具体用法?Java ParserConfig.getDeserializer怎么用?Java ParserConfig.getDeserializer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.alibaba.fastjson.parser.ParserConfig
的用法示例。
在下文中一共展示了ParserConfig.getDeserializer方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSeeAlso
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
protected JavaBeanDeserializer getSeeAlso(ParserConfig config, JavaBeanInfo beanInfo, String typeName) {
if (beanInfo.jsonType == null) {
return null;
}
for (Class<?> seeAlsoClass : beanInfo.jsonType.seeAlso()) {
ObjectDeserializer seeAlsoDeser = config.getDeserializer(seeAlsoClass);
if (seeAlsoDeser instanceof JavaBeanDeserializer) {
JavaBeanDeserializer seeAlsoJavaBeanDeser = (JavaBeanDeserializer) seeAlsoDeser;
JavaBeanInfo subBeanInfo = seeAlsoJavaBeanDeser.beanInfo;
if (subBeanInfo.typeName.equals(typeName)) {
return seeAlsoJavaBeanDeser;
}
JavaBeanDeserializer subSeeAlso = getSeeAlso(config, subBeanInfo, typeName);
if (subSeeAlso != null) {
return subSeeAlso;
}
}
}
return null;
}
示例2: ImageGenDecoder
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
public ImageGenDecoder (ParserConfig config, Class clazz) {
super(config, clazz);
size_gen_deser__ = config.getDeserializer(data.media.Image.Size.class);
}
示例3: MediaGenDecoder
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
public MediaGenDecoder (ParserConfig config, Class clazz) {
super(config, clazz);
// data.media.Media.Player
player_gen_deser__ = config.getDeserializer(data.media.Media.Player.class);
}
示例4: test_for_issue
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
public void test_for_issue() throws Exception {
ParserConfig config = new ParserConfig();
ObjectDeserializer deser = config.getDeserializer(Model.class);
Assert.assertEquals(JavaBeanDeserializer.class, deser.getClass());
}
示例5: DepartmentCodec
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
public DepartmentCodec (ParserConfig config, Class clazz) {
super(config, clazz);
type_gen_deser__ = config.getDeserializer(com.alibaba.json.test.codegen.DepartmentType.class);
}
示例6: StringFieldDeserializer
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
public StringFieldDeserializer(ParserConfig config, Class<?> clazz, FieldInfo fieldInfo) {
super(clazz, fieldInfo);
this.fieldValueDeserilizer = config.getDeserializer(fieldInfo);
}
示例7: LongFieldDeserializer
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
public LongFieldDeserializer(ParserConfig mapping, Class<?> clazz, FieldInfo fieldInfo) {
super(clazz, fieldInfo);
this.fieldValueDeserilizer = mapping.getDeserializer(fieldInfo);
}
示例8: StringFieldDeserializer
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
public StringFieldDeserializer(ParserConfig config, Class<?> clazz, FieldInfo fieldInfo){
super(clazz, fieldInfo);
fieldValueDeserilizer = config.getDeserializer(fieldInfo);
}
示例9: LongFieldDeserializer
import com.alibaba.fastjson.parser.ParserConfig; //导入方法依赖的package包/类
public LongFieldDeserializer(ParserConfig mapping, Class<?> clazz, FieldInfo fieldInfo){
super(clazz, fieldInfo);
fieldValueDeserilizer = mapping.getDeserializer(fieldInfo);
}