JsonSerializer class
A utility class that provides JSON serialization and deserialization functionality.
This class offers static methods to convert Dart objects to JSON strings and vice versa, with support for custom types, converters, and naming conventions.
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- options ↔ JsonSerializerOptions
-
The default serializer options used when no options are provided.
getter/setter pair
Static Methods
-
deserialize<
T> (String json, [JsonSerializerOptions? options]) → T - Deserializes the given JSON string into an object of the specified type.
-
serialize(
Object? object, [JsonSerializerOptions? options]) → String - Serializes the given object into a JSON string.