Top Description Fields Constructors Methods
tools.jackson.dataformat.xml.deser

public Class XmlDeserializationContext

extends DeserializationContextExt
Class Inheritance
Imports
tools.jackson.core.FormatSchema, .JacksonException, .TokenStreamFactory, .JsonParser, .JsonToken, tools.jackson.databind.*, tools.jackson.databind.deser.DeserializationContextExt, .DeserializerCache, .DeserializerFactory, tools.jackson.dataformat.xml.XmlFactory

XML-specific DeserializationContext needed to override certain handlers.

Field Summary

Modifier and TypeField and Description
private final String
Inherited from tools.jackson.databind.deser.DeserializationContextExt:
_objectIds

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
extractScalarFromObject(JsonParser p, ValueDeserializer<?> deser, Class<?> scalarType)

Overrides tools.jackson.databind.DeserializationContext.extractScalarFromObject.

Method to call in case incoming shape is Object Value (and parser thereby points to tools.jackson.core.JsonToken#START_OBJECT token), but a Scalar value (potentially coercible from String value) is expected.

public Object
Inherited from tools.jackson.databind.deser.DeserializationContextExt:
_unwrapAndDeserializeassignAndReturnParserassignParsercheckUnresolvedObjectIdcreateReadableObjectIddeserializerInstancefindObjectIdkeyDeserializerInstancetryToResolveUnresolvedObjectId

Field Detail

_xmlTextElementNameback to summary
private final String _xmlTextElementName

Constructor Detail

XmlDeserializationContextback to summary
public XmlDeserializationContext(TokenStreamFactory tsf, DeserializerFactory deserializerFactory, DeserializerCache cache, DeserializationConfig config, FormatSchema schema, InjectableValues values)

Method Detail

extractScalarFromObjectback to summary
public String extractScalarFromObject(JsonParser p, ValueDeserializer<?> deser, Class<?> scalarType) throws JacksonException

Overrides tools.jackson.databind.DeserializationContext.extractScalarFromObject.

Doc from tools.jackson.databind.DeserializationContext.extractScalarFromObject.

Method to call in case incoming shape is Object Value (and parser thereby points to tools.jackson.core.JsonToken#START_OBJECT token), but a Scalar value (potentially coercible from String value) is expected. This would typically be used to deserialize a Number, Boolean value or some other "simple" unstructured value type.

Note that expected behavior in case of extraction not succeeding changed in Jackson 2.20: now null is expected to be returned in that case (in 2.19 and before, exception was to be thrown, but this prevented fallback handling via DeserializationProblemHandler#handleUnexpectedToken.

Annotations
@Override
Exceptions
JacksonException:
If there are problems either reading content (underlying parser problem) or finding expected scalar value
readRootValueback to summary
public Object readRootValue(JsonParser p, JavaType valueType, ValueDeserializer<Object> deser, Object valueToUpdate) throws JacksonException

Overrides tools.jackson.databind.deser.DeserializationContextExt.readRootValue.

Annotations
@Override