本文整理汇总了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;
}
示例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);
}
示例3: acceptJsonFormatVisitor
import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
CalendarSerializer.instance.acceptJsonFormatVisitor(paramJsonFormatVisitorWrapper, null);
}
示例4: getSchema
import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
public JsonNode getSchema(SerializerProvider paramSerializerProvider, Type paramType)
{
return CalendarSerializer.instance.getSchema(paramSerializerProvider, paramType);
}
示例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);
}
示例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);
}
示例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);
}
示例8: acceptJsonFormatVisitor
import com.fasterxml.jackson.databind.ser.std.CalendarSerializer; //导入依赖的package包/类
@Override
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint) {
CalendarSerializer.instance.acceptJsonFormatVisitor(visitor, null);
}