當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。