JsonConverter<T> class
abstract
Base class for all JSON converters.
A JSON converter is responsible for converting a specific data type to and from JSON format. Implementations must provide methods to check if they can handle a type, and to read/write values.
@typeparam T The type that this converter handles.
Constructors
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
-
canConvert(
TypeInfo type) → bool - Determines whether this converter can convert the specified type.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
dynamic value, TypeInfo type, JsonSerializerOptions options) → T -
Converts the JSON value to type
T. -
readNull(
dynamic value, TypeInfo type, JsonSerializerOptions options) → T? -
Converts a null JSON value to type
T. -
toString(
) → String -
A string representation of this object.
inherited
-
write(
T value, TypeInfo type, JsonSerializerOptions options) → Object? - Converts the value to JSON format.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited