public class MapDeserializer extends Object implements ObjectDeserializer
Modifier and Type | Field and Description |
---|---|
static MapDeserializer |
instance |
Constructor and Description |
---|
MapDeserializer() |
Modifier and Type | Method and Description |
---|---|
Map<Object,Object> |
createMap(Type type) |
Map<Object,Object> |
createMap(Type type,
int featrues) |
<T> T |
deserialze(DefaultJSONParser parser,
Type type,
Object fieldName)
fastjson invokes this call-back method during deserialization when it encounters a field of the
specified type.
|
int |
getFastMatchToken() |
static Object |
parseMap(DefaultJSONParser parser,
Map<Object,Object> map,
Type keyType,
Type valueType,
Object fieldName) |
static Map |
parseMap(DefaultJSONParser parser,
Map<String,Object> map,
Type valueType,
Object fieldName) |
public static MapDeserializer instance
public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName)
ObjectDeserializer
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.
deserialze
in interface ObjectDeserializer
parser
- context DefaultJSONParser being deserializedtype
- The type of the Object to deserialize tofieldName
- parent object field nameT
public static Map parseMap(DefaultJSONParser parser, Map<String,Object> map, Type valueType, Object fieldName)
public static Object parseMap(DefaultJSONParser parser, Map<Object,Object> map, Type keyType, Type valueType, Object fieldName)
public int getFastMatchToken()
getFastMatchToken
in interface ObjectDeserializer
Copyright © 2012–2020 Alibaba Group. All rights reserved.