当前位置: 首页>>代码示例>>Java>>正文


Java StdDeserializer类代码示例

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


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

示例1: addJodaDeserializers

import org.codehaus.jackson.map.deser.std.StdDeserializer; //导入依赖的package包/类
/**
 * Add Joda-Time deserializers to a module.
 */
private static void addJodaDeserializers(final SimpleModule module) {

    for (final StdDeserializer<?> deserializer : new JodaDeserializers().provide()) {
        module.addDeserializer((Class) deserializer.getValueClass(), deserializer);
    }
    module.addDeserializer(Duration.class, DurationDeserializer.create());
    module.addDeserializer(Instant.class, InstantDeserializer.create());
    module.addDeserializer(ReadableInstant.class, InstantDeserializer.create());
    module.addDeserializer(Interval.class, IntervalDeserializer.create());
    module.addDeserializer(LocalDate.class, LocalDateDeserializer.create());
}
 
开发者ID:NovaOrdis,项目名称:playground,代码行数:15,代码来源:BasicObjectMapperProvider.java

示例2: StdDeserializers

import org.codehaus.jackson.map.deser.std.StdDeserializer; //导入依赖的package包/类
private StdDeserializers()
{
  add(new UntypedObjectDeserializer());
  StringDeserializer localStringDeserializer = new StringDeserializer();
  add(localStringDeserializer, String.class);
  add(localStringDeserializer, CharSequence.class);
  add(new ClassDeserializer());
  add(new StdDeserializer.BooleanDeserializer(Boolean.class, null));
  add(new StdDeserializer.ByteDeserializer(Byte.class, null));
  add(new StdDeserializer.ShortDeserializer(Short.class, null));
  add(new StdDeserializer.CharacterDeserializer(Character.class, null));
  add(new StdDeserializer.IntegerDeserializer(Integer.class, null));
  add(new StdDeserializer.LongDeserializer(Long.class, null));
  add(new StdDeserializer.FloatDeserializer(Float.class, null));
  add(new StdDeserializer.DoubleDeserializer(Double.class, null));
  add(new StdDeserializer.BooleanDeserializer(Boolean.TYPE, Boolean.FALSE));
  add(new StdDeserializer.ByteDeserializer(Byte.TYPE, Byte.valueOf((byte)0)));
  add(new StdDeserializer.ShortDeserializer(Short.TYPE, Short.valueOf((short)0)));
  add(new StdDeserializer.CharacterDeserializer(Character.TYPE, Character.valueOf('\000')));
  add(new StdDeserializer.IntegerDeserializer(Integer.TYPE, Integer.valueOf(0)));
  add(new StdDeserializer.LongDeserializer(Long.TYPE, Long.valueOf(0L)));
  add(new StdDeserializer.FloatDeserializer(Float.TYPE, Float.valueOf(0.0F)));
  add(new StdDeserializer.DoubleDeserializer(Double.TYPE, Double.valueOf(0.0D)));
  add(new StdDeserializer.NumberDeserializer());
  add(new StdDeserializer.BigDecimalDeserializer());
  add(new StdDeserializer.BigIntegerDeserializer());
  add(new CalendarDeserializer());
  add(new DateDeserializer());
  add(new CalendarDeserializer(GregorianCalendar.class), GregorianCalendar.class);
  add(new StdDeserializer.SqlDateDeserializer());
  add(new TimestampDeserializer());
  Iterator localIterator = FromStringDeserializer.all().iterator();
  while (localIterator.hasNext())
    add((FromStringDeserializer)localIterator.next());
  add(new StdDeserializer.StackTraceElementDeserializer());
  add(new AtomicBooleanDeserializer());
  add(new TokenBufferDeserializer());
  add(new JavaTypeDeserializer());
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:40,代码来源:StdDeserializers.java

示例3: add

import org.codehaus.jackson.map.deser.std.StdDeserializer; //导入依赖的package包/类
private void add(StdDeserializer<?> paramStdDeserializer)
{
  add(paramStdDeserializer, paramStdDeserializer.getValueClass());
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:5,代码来源:StdDeserializers.java


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