Interface JsonDeserializer<T>
- Type Parameters:
T- the type this deserializer produces
- All Superinterfaces:
JsonComponent<T>
- All Known Subinterfaces:
JsonConverter<T>
Interface for deserializing JSON to Java objects.
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize(JsonParser parser) Deserializes JSON data from the parser into an object of type T.default TReturn the default value when deserializing a null JSON value.Methods inherited from interface JsonComponent
configure, typeModifier and TypeMethodDescriptiondefault voidconfigure(JsonBindingConfigurator jsonBindingConfigurator) Configures this component with the provided configurator.type()Return the type this component handles.
-
Method Details
-
deserialize
Deserializes JSON data from the parser into an object of type T. This method should never be called if the value in the parser is null. If the value is null, usedeserializeNull()instead.- Parameters:
parser- the JSON parser to read from- Returns:
- the deserialized object
-
deserializeNull
Return the default value when deserializing a null JSON value.This method is called when a JSON null value is encountered. The default implementation returns null.
- Returns:
- the deserialized null value, typically null
-