A specialization of ObjectDeserializer for JSON deserialization using a JsonParser.
This interface provides type-safe deserialization for objects of type T
specifically from JSON. It inherits all deserialization behavior and contract
from ObjectDeserializer, but fixes the parser type to JsonParser.
Example
class UserDeserializer extends JsonDeserializer<User> {
@override
User? deserialize(JsonParser parser, DeserializationContext ctxt, Class toClass) {
// Parse the JSON object using parser and return a User instance
}
}
See Also
- Implemented types
- Annotations
-
- @Generic.new(JsonDeserializer)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canDeserialize(
Class type) → bool -
Returns whether the given
typecan be deserialized by the system.inherited -
deserialize(
JsonParser parser, JsonDeserializationContext ctxt, Class toClass) → T? -
Deserializes an object of type
Tusing the givenPand DeserializationContext.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
supports(
DeserializationContext< Parser> context) → bool -
Determines whether this deserializer supports the given deserialization context.
inherited
-
toClass(
) → Class< T> -
Provides a contract for types capable of exposing their associated
runtime
Classmetadata representation within the Jetleaf reflection system.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited