AsyncJsonCodec class abstract interface

Encodes and decodes JSON asynchronously, so that a large payload does not block the calling isolate for long.

YAJsonIsolate is the implementation the Supabase clients use when none is supplied. Implement this interface to route their JSON work somewhere else, for example through a native parser or through an instrumented wrapper that records how long each payload takes.

Every method is asynchronous even when an implementation does the work inline, so that a caller cannot come to depend on the work happening synchronously.

Implementers

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

decode(String json) → Future
Decodes json into Dart values, like jsonDecode.
decodeBytes(Uint8List encodedJson) → Future
Decodes UTF-8 encoded JSON in encodedJson into Dart values.
dispose() → Future<void>
Releases whatever the codec holds.
encode(Object? json) → Future<String>
Encodes json into a JSON string, like jsonEncode.
encodeBytes(Object? json) → Future<Uint8List>
Encodes json into UTF-8 encoded JSON.
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