ToJson class abstract interface

A marker interface for all classes that can be converted to JSON.

Note that the use of this interface is optional; the Dart SDK uses dynamic dispatch to invote toJson on any object that is passed to dart.jsonEncode or similar methods.

See dart.dev/libraries/dart-convert#decoding-and-encoding-json.

Constructors

ToJson()

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
toJson() JsonValue
Converts this object to a JSON value.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited