Class Jdk8DateCodec
- java.lang.Object
-
- com.alibaba.fastjson.parser.deserializer.ContextObjectDeserializer
-
- com.alibaba.fastjson.parser.deserializer.Jdk8DateCodec
-
- All Implemented Interfaces:
ObjectDeserializer,ContextObjectSerializer,ObjectSerializer
public class Jdk8DateCodec extends ContextObjectDeserializer implements ObjectSerializer, ContextObjectSerializer, ObjectDeserializer
-
-
Field Summary
Fields Modifier and Type Field Description static Jdk8DateCodecinstance
-
Constructor Summary
Constructors Constructor Description Jdk8DateCodec()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ObjectcastToLocalDateTime(Object value, String format)<T> Tdeserialze(DefaultJSONParser parser, Type type, Object fieldName, String format, int feature)intgetFastMatchToken()voidwrite(JSONSerializer serializer, Object object, BeanContext context)voidwrite(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.-
Methods inherited from class com.alibaba.fastjson.parser.deserializer.ContextObjectDeserializer
deserialze
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.alibaba.fastjson.parser.deserializer.ObjectDeserializer
deserialze
-
-
-
-
Field Detail
-
instance
public static final Jdk8DateCodec instance
-
-
Method Detail
-
deserialze
public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName, String format, int feature)
- Specified by:
deserialzein classContextObjectDeserializer
-
getFastMatchToken
public int getFastMatchToken()
- Specified by:
getFastMatchTokenin interfaceObjectDeserializer
-
write
public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException
Description copied from interface:ObjectSerializerfastjson invokes this call-back method during serialization when it encounters a field of the specified type.- Specified by:
writein interfaceObjectSerializerobject- src the object that needs to be converted to Json.fieldName- parent object field namefieldType- parent object field typefeatures- parent object field serializer features- Throws:
IOException
-
write
public void write(JSONSerializer serializer, Object object, BeanContext context) throws IOException
- Specified by:
writein interfaceContextObjectSerializer- Throws:
IOException
-
-