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


Java CalendarSerializer类代码示例

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


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

示例1: findSerializerByPrimaryType

import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
protected final JsonSerializer<?> findSerializerByPrimaryType(SerializerProvider paramSerializerProvider, JavaType paramJavaType, BeanDescription paramBeanDescription, boolean paramBoolean)
{
  Class localClass = paramJavaType.getRawClass();
  if (InetAddress.class.isAssignableFrom(localClass))
    return InetAddressSerializer.instance;
  if (TimeZone.class.isAssignableFrom(localClass))
    return TimeZoneSerializer.instance;
  if (Charset.class.isAssignableFrom(localClass))
    return ToStringSerializer.instance;
  JsonSerializer localJsonSerializer = findOptionalStdSerializer(paramSerializerProvider, paramJavaType, paramBeanDescription, paramBoolean);
  if (localJsonSerializer != null)
    return localJsonSerializer;
  if (Number.class.isAssignableFrom(localClass))
    return NumberSerializers.NumberSerializer.instance;
  if (Enum.class.isAssignableFrom(localClass))
    return buildEnumSerializer(paramSerializerProvider.getConfig(), paramJavaType, paramBeanDescription);
  if (Calendar.class.isAssignableFrom(localClass))
    return CalendarSerializer.instance;
  if (java.util.Date.class.isAssignableFrom(localClass))
    return DateSerializer.instance;
  return null;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:23,代码来源:BasicSerializerFactory.java

示例2: setupModule

import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
@Override
public void setupModule(Module.SetupContext context) {
    SimpleSerializers serializers = new SimpleSerializers();
    SimpleDeserializers deserializers = new SimpleDeserializers();

    serializers.addSerializer(ModelObjectInterface.class, new NoJpaSerializer());
    serializers.addSerializer(Calendar.class, new CalendarSerializer());
    serializers.addSerializer(NList.class, new NListSerializer());
    context.addSerializers(serializers);
    context.addDeserializers(deserializers);
}
 
开发者ID:NoJPA-LESS-IS-MORE,项目名称:NoJPA,代码行数:12,代码来源:NoJpaModule.java

示例3: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
  CalendarSerializer.instance.acceptJsonFormatVisitor(paramJsonFormatVisitorWrapper, null);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:CoreXMLSerializers.java

示例4: getSchema

import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
public JsonNode getSchema(SerializerProvider paramSerializerProvider, Type paramType)
{
  return CalendarSerializer.instance.getSchema(paramSerializerProvider, paramType);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:CoreXMLSerializers.java

示例5: serialize

import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
public void serialize(XMLGregorianCalendar paramXMLGregorianCalendar, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider)
{
  CalendarSerializer.instance.serialize(paramXMLGregorianCalendar.toGregorianCalendar(), paramJsonGenerator, paramSerializerProvider);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:CoreXMLSerializers.java

示例6: serialize

import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
@Override
public void serialize(XMLGregorianCalendar value, JsonGenerator jgen, SerializerProvider provider)
        throws IOException, JsonGenerationException {
    CalendarSerializer.instance.serialize(value.toGregorianCalendar(), jgen, provider);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:6,代码来源:CoreXMLSerializers.java

示例7: getSchema

import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
@Override
public JsonNode getSchema(SerializerProvider provider, Type typeHint) throws JsonMappingException {
    return CalendarSerializer.instance.getSchema(provider, typeHint);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:5,代码来源:CoreXMLSerializers.java

示例8: acceptJsonFormatVisitor

import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) {
    CalendarSerializer.instance.acceptJsonFormatVisitor(visitor, null);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:5,代码来源:CoreXMLSerializers.java


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