本文整理匯總了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);
}