public class CalendarCodec extends ContextObjectDeserializer implements ObjectSerializer, ObjectDeserializer, ContextObjectSerializer
| 限定符和类型 | 字段和说明 |
|---|---|
static CalendarCodec |
instance |
| 构造器和说明 |
|---|
CalendarCodec() |
| 限定符和类型 | 方法和说明 |
|---|---|
XMLGregorianCalendar |
createXMLGregorianCalendar(Calendar calendar) |
<T> T |
deserialze(DefaultJSONParser parser,
Type clazz,
Object fieldName)
fastjson invokes this call-back method during deserialization when it encounters a field of the
specified type.
|
<T> T |
deserialze(DefaultJSONParser parser,
Type type,
Object fieldName,
String format,
int features) |
int |
getFastMatchToken() |
void |
write(JSONSerializer serializer,
Object object,
BeanContext context) |
void |
write(JSONSerializer serializer,
Object object,
Object fieldName,
Type fieldType,
int features)
fastjson invokes this call-back method during serialization when it encounters a field of the
specified type.
|
public static final CalendarCodec instance
public void write(JSONSerializer serializer, Object object, BeanContext context) throws IOException
write 在接口中 ContextObjectSerializerIOExceptionpublic void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException
ObjectSerializerwrite 在接口中 ObjectSerializerobject - src the object that needs to be converted to Json.fieldName - parent object field namefieldType - parent object field typefeatures - parent object field serializer featuresIOExceptionpublic <T> T deserialze(DefaultJSONParser parser, Type clazz, Object fieldName)
ObjectDeserializerIn the implementation of this call-back method, you should consider invoking
JSON.parseObject(String, Type, Feature[]) method to create objects
for any non-trivial field of the returned object.
deserialze 在接口中 ObjectDeserializerdeserialze 在类中 ContextObjectDeserializerparser - context DefaultJSONParser being deserializedclazz - The type of the Object to deserialize tofieldName - parent object field nameTpublic <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName, String format, int features)
deserialze 在类中 ContextObjectDeserializerpublic XMLGregorianCalendar createXMLGregorianCalendar(Calendar calendar)
public int getFastMatchToken()
getFastMatchToken 在接口中 ObjectDeserializerCopyright © 2012–2020 Alibaba Group. All rights reserved.