JsonSerializer class
A class that provides JSON serialization and deserialization functionality.
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 JsonSerializerOptions.
getter/setter pair
Static Methods
-
deserialize<
T> (String json, [JsonSerializerOptions? options]) → T -
Deserializes the given
json
string into an object of typeT
using the providedoptions
. Returns the deserialized object. -
serialize(
Object? object, [JsonSerializerOptions? options]) → String -
Serializes the given
object
into a JSON string using the providedoptions
. Returns the serialized JSON string.