Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Serialization

Service that manages (de-)serialization of objects.

Hierarchy

  • Serialization

Index

Constructors

constructor

Properties

Protected Readonly injector

injector: Container

Protected serializers

serializers: Collection<RegisteredSerializer<Serializer<unknown, JSONState>>> = ...

Serializers registered with the service. We store the DI keys and realize them as needed, rather than at register time since most registration is done via the @ObjectSerializer decorator and the ContainerBlueprint. Realizing them at that time can cause loops in the DI call to realizeContainer since getContainer() -> realizeContainer() -> make the serializer -> getContainer(). This largely defers the realization until after all the DI keys are registered with the global Container.

Methods

decode

decodeJSON

  • decodeJSON<T>(payload: string, validator?: Validator<T>): Promise<T>

encode

encodeJSON

  • encodeJSON<T>(value: T): Promise<string>

Protected matchActual

Protected matchSerial

register

registerInstance

Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.