AbstractEncoding<T> class
abstract
@fileoverview An abstract class for an encoder. Converts object to intermediate representation using serdes package, then allows subclass to encode to final format (such as XML or JSON). REMEMBER: API is asymmetric. We can encode the Dart object, but can't decode back to a Dart object, so client must help with final decode back to format.
- Implemented types
- Implementers
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
-
decode(
T encodedPayload) → MarshalledObject -
Asymmetric: It is necessary for the client to provide context to deserialize back to Object.
override
-
encode(
MarshalledObject payload) → T -
We provide all serialization from Object to T.
override
-
encodeDartObject(
Object? dartObject) → T - Convenience to encode a Dart object
-
fromIntermediateToFormat(
MarshalledObject intermediateFormat) → T - abstract method
-
getContentType(
) → String -
abstract method: Provide MIME type
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toIntermediateFromFormat(
T encodedPayload) → MarshalledObject - abstract method
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited