use of com.alibaba.fastjson.parser.deserializer.ResolveFieldDeserializer in project fastjson by alibaba.
the class DefaultJSONParser method checkListResolve.
@SuppressWarnings("rawtypes")
public void checkListResolve(Collection array) {
if (resolveStatus == NeedToResolve) {
if (array instanceof List) {
final int index = array.size() - 1;
final List list = (List) array;
ResolveTask task = getLastResolveTask();
task.fieldDeserializer = new ResolveFieldDeserializer(this, list, index);
task.ownerContext = context;
setResolveStatus(DefaultJSONParser.NONE);
} else {
ResolveTask task = getLastResolveTask();
task.fieldDeserializer = new ResolveFieldDeserializer(array);
task.ownerContext = context;
setResolveStatus(DefaultJSONParser.NONE);
}
}
}
use of com.alibaba.fastjson.parser.deserializer.ResolveFieldDeserializer in project fastjson by alibaba.
the class ResolveFieldDeserializerTest method test_0.
public void test_0() throws Exception {
new ResolveFieldDeserializer(null, null).parseField(null, null, null, null);
new ResolveFieldDeserializer(null, null, 0).parseField(null, null, null, null);
}
use of com.alibaba.fastjson.parser.deserializer.ResolveFieldDeserializer in project fastjson by alibaba.
the class DefaultJSONParser method checkMapResolve.
@SuppressWarnings("rawtypes")
public void checkMapResolve(Map object, Object fieldName) {
if (resolveStatus == NeedToResolve) {
ResolveFieldDeserializer fieldResolver = new ResolveFieldDeserializer(object, fieldName);
ResolveTask task = getLastResolveTask();
task.fieldDeserializer = fieldResolver;
task.ownerContext = context;
setResolveStatus(DefaultJSONParser.NONE);
}
}
Aggregations