下面列出了com.fasterxml.jackson.databind.DeserializationContext#getParser ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Handle deserialization of the 'null' value.
*/
@Override
public Fruit getNullValue(DeserializationContext ctxt) throws JsonMappingException {
throw new JsonMappingException(ctxt.getParser(), "Fruit cannot be null");
}
/**
* Handle deserialization of the 'null' value.
*/
@Override
public GmFruit getNullValue(DeserializationContext ctxt) throws JsonMappingException {
throw new JsonMappingException(ctxt.getParser(), "GmFruit cannot be null");
}
/**
* Handle deserialization of the 'null' value.
*/
@Override
public Triangle getNullValue(DeserializationContext ctxt) throws JsonMappingException {
throw new JsonMappingException(ctxt.getParser(), "Triangle cannot be null");
}
/**
* Handle deserialization of the 'null' value.
*/
@Override
public Pig getNullValue(DeserializationContext ctxt) throws JsonMappingException {
throw new JsonMappingException(ctxt.getParser(), "Pig cannot be null");
}
/**
* Handle deserialization of the 'null' value.
*/
@Override
public Quadrilateral getNullValue(DeserializationContext ctxt) throws JsonMappingException {
throw new JsonMappingException(ctxt.getParser(), "Quadrilateral cannot be null");
}
/**
* Handle deserialization of the 'null' value.
*/
@Override
public Shape getNullValue(DeserializationContext ctxt) throws JsonMappingException {
throw new JsonMappingException(ctxt.getParser(), "Shape cannot be null");
}
/**
* Handle deserialization of the 'null' value.
*/
@Override
public Mammal getNullValue(DeserializationContext ctxt) throws JsonMappingException {
throw new JsonMappingException(ctxt.getParser(), "Mammal cannot be null");
}
protected InvalidNullException(DeserializationContext ctxt, String msg,
PropertyName pname)
{
super(ctxt.getParser(), msg);
_propertyName = pname;
}