Class JSONPDeserializer
- java.lang.Object
-
- com.alibaba.fastjson.parser.deserializer.JSONPDeserializer
-
- All Implemented Interfaces:
ObjectDeserializer
public class JSONPDeserializer extends Object implements ObjectDeserializer
Created by wenshao on 21/02/2017.
-
-
Field Summary
Fields Modifier and Type Field Description static JSONPDeserializerinstance
-
Constructor Summary
Constructors Constructor Description JSONPDeserializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tdeserialze(DefaultJSONParser parser, Type type, Object fieldName)fastjson invokes this call-back method during deserialization when it encounters a field of the specified type.intgetFastMatchToken()
-
-
-
Field Detail
-
instance
public static final JSONPDeserializer instance
-
-
Method Detail
-
deserialze
public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName)
Description copied from interface:ObjectDeserializerfastjson invokes this call-back method during deserialization when it encounters a field of the specified type.In 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.- Specified by:
deserialzein interfaceObjectDeserializer- Parameters:
parser- context DefaultJSONParser being deserializedtype- The type of the Object to deserialize tofieldName- parent object field name- Returns:
- a deserialized object of the specified type which is a subclass of
T
-
getFastMatchToken
public int getFastMatchToken()
- Specified by:
getFastMatchTokenin interfaceObjectDeserializer
-
-