JSONMethodCodec class

MethodCodec with UTF-8 encoded JSON method calls and result envelopes.

Values supported as method arguments and result payloads are those supported by JSONMessageCodec.

Implemented types

Constructors

JSONMethodCodec()
Creates a MethodCodec with UTF-8 encoded JSON method calls and result envelopes.
const

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

decodeEnvelope(ByteData envelope) → dynamic
Decodes the specified result envelope from binary.
override
decodeMethodCall(ByteData? methodCall) MethodCall
Decodes the specified methodCall from binary.
override
encodeErrorEnvelope({required String code, String? message, Object? details}) ByteData
Encodes an error result into a binary envelope.
override
encodeMethodCall(MethodCall methodCall) ByteData
Encodes the specified methodCall into binary.
override
encodeSuccessEnvelope(Object? result) ByteData
Encodes a successful result into a binary envelope.
override
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