• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java StdDeserializerProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.codehaus.jackson.map.deser.StdDeserializerProvider的典型用法代码示例。如果您正苦于以下问题:Java StdDeserializerProvider类的具体用法?Java StdDeserializerProvider怎么用?Java StdDeserializerProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StdDeserializerProvider类属于org.codehaus.jackson.map.deser包,在下文中一共展示了StdDeserializerProvider类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: JsonSchemaSerializer

import org.codehaus.jackson.map.deser.StdDeserializerProvider; //导入依赖的package包/类
public JsonSchemaSerializer() {
    objectMapper = new ObjectMapper();
    SimpleDeserializers simpleDeserializers = new SimpleDeserializers();
    simpleDeserializers.addDeserializer(String.class, new StringDeserializer());
    objectMapper.setDeserializerProvider(
            new StdDeserializerProvider().withAdditionalDeserializers(simpleDeserializers));
}
 
开发者ID:presidentio,项目名称:test-data-generator,代码行数:8,代码来源:JsonSchemaSerializer.java


示例2: setUp

import org.codehaus.jackson.map.deser.StdDeserializerProvider; //导入依赖的package包/类
@Before
public void setUp(){
    mapper = new ObjectMapper();
    SimpleDeserializers deserializers = new SimpleDeserializers();
    deserializers.addDeserializer(Map.class, new StripeObjectDeserializer());
    mapper.setDeserializerProvider(new StdDeserializerProvider().withAdditionalDeserializers(deserializers));
}
 
开发者ID:jlinn,项目名称:stripe-api-java,代码行数:8,代码来源:StripeObjectDeserializerTest.java


示例3: ObjectMapper

import org.codehaus.jackson.map.deser.StdDeserializerProvider; //导入依赖的package包/类
/**
 * 
 * @param jf JsonFactory to use: if null, a new {@link MappingJsonFactory} will be constructed
 * @param sp SerializerProvider to use: if null, a {@link StdSerializerProvider} will be constructed
 * @param dp DeserializerProvider to use: if null, a {@link StdDeserializerProvider} will be constructed
 * @param sconfig Serialization configuration to use; if null, basic {@link SerializationConfig}
 * 	will be constructed
 * @param dconfig Deserialization configuration to use; if null, basic {@link DeserializationConfig}
 * 	will be constructed
 */
public ObjectMapper(JsonFactory jf,
                    SerializerProvider sp, DeserializerProvider dp,
                   SerializationConfig sconfig, DeserializationConfig dconfig)
{
    /* 02-Mar-2009, tatu: Important: we MUST default to using
     *   the mapping factory, otherwise tree serialization will
     *   have problems with POJONodes.
     * 03-Jan-2010, tatu: and obviously we also must pass 'this',
     *    to create actual linking.
     */
    _jsonFactory = (jf == null) ? new MappingJsonFactory(this) : jf;
    // visibility checker; usually default
    _visibilityChecker = STD_VISIBILITY_CHECKER;
    _serializationConfig = (sconfig != null) ? sconfig :
        new SerializationConfig(DEFAULT_INTROSPECTOR, DEFAULT_ANNOTATION_INTROSPECTOR, _visibilityChecker);
    _deserializationConfig = (dconfig != null) ? dconfig :
        new DeserializationConfig(DEFAULT_INTROSPECTOR, DEFAULT_ANNOTATION_INTROSPECTOR, _visibilityChecker);
    _serializerProvider = (sp == null) ? new StdSerializerProvider() : sp;
    _deserializerProvider = (dp == null) ? new StdDeserializerProvider() : dp;

    // Default serializer factory is stateless, can just assign
    _serializerFactory = BeanSerializerFactory.instance;

    // and use standard JsonNodeFactory initially
    _nodeFactory = JsonNodeFactory.instance;

}
 
开发者ID:r00li,项目名称:RHome,代码行数:38,代码来源:ObjectMapper.java


示例4: createCustomMapper

import org.codehaus.jackson.map.deser.StdDeserializerProvider; //导入依赖的package包/类
public static ObjectMapper createCustomMapper() {
  ObjectMapper result = new ObjectMapper();
  CustomDeserializerFactory deserializerFactory = new CustomDeserializerFactory();

  deserializerFactory.addSpecificMapping(Configuration.class, new ConfigurationDeserializer());
  deserializerFactory.addSpecificMapping(CounterMap.class, new CounterDeserializer());

  result.setDeserializerProvider(new StdDeserializerProvider(deserializerFactory));
  return result;
}
 
开发者ID:twitter,项目名称:hraven,代码行数:11,代码来源:ClientObjectMapper.java


示例5: toObjectMapper

import org.codehaus.jackson.map.deser.StdDeserializerProvider; //导入依赖的package包/类
public ObjectMapper toObjectMapper() {

        final CustomDeserializerFactory factory = createFactory();

        final DeserializerProvider deserializerProvider = new StdDeserializerProvider(factory);

        final ObjectMapper mapper = new ObjectMapper();
        mapper.setDeserializerProvider(deserializerProvider);

        return mapper;
    }
 
开发者ID:cerner,项目名称:jwala,代码行数:12,代码来源:JsonDeserializationBehavior.java



注:本文中的org.codehaus.jackson.map.deser.StdDeserializerProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java S01PacketPong类代码示例发布时间:2022-05-23
下一篇:
Java InstanceManager类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap