Class Serializer

Hierarchy-Diagram

UML class diagram of Serializer
Legend
icon for a class in the UML class diagram class

Hierarchy

  • unknown
    • Serializer

Constructors

Properties

errorHandler: ((error) => void) = ...

Type declaration

    • (error): void
    • Parameters

      • error: Error

      Returns void

getErrorHandler: (() => ((error) => void))

Type declaration

    • (): ((error) => void)
    • Returns ((error) => void)

        • (error): void
        • Parameters

          • error: Error

          Returns void

getTypeHintEmitter: (() => TypeHintEmitter)

Type declaration

    • (): TypeHintEmitter
    • Returns TypeHintEmitter

options?: OptionsBase
retrievePreserveNull: ((memberOptions?) => boolean)

Type declaration

    • (memberOptions?): boolean
    • Parameters

      Returns boolean

serializationStrategy: Map<Serializable<any>, SerializerFn<any, TypeDescriptor, any>>
setErrorHandler: ((errorHandlerCallback) => void)

Type declaration

    • (errorHandlerCallback): void
    • Parameters

      • errorHandlerCallback: ((error) => void)
          • (error): void
          • Parameters

            • error: Error

            Returns void

      Returns void

setSerializationStrategy: ((type, serializer) => void)

Type declaration

setTypeHintEmitter: ((typeEmitterCallback) => void)

Type declaration

    • (typeEmitterCallback): void
    • Parameters

      • typeEmitterCallback: TypeHintEmitter

      Returns void

typeHintEmitter: TypeHintEmitter

Methods

  • Performs the conversion of an array of typed objects (or primitive values) to an array of simple javascript objects (or primitive values) for serialization.

    Parameters

    • sourceObject: any[]

      Source object to convert

    • typeDescriptor: ArrayTypeDescriptor

      Type descriptor of source object

    • memberName: string

      Member name to convert

    • serializer: Serializer

      Serializer

    • Optional memberOptions: ObjectMemberMetadata

      Member options of memberName

    • Optional serializerOptions: any

      Custom serializer options

    Returns any[]

  • Performs the conversion of a map of typed objects (or primitive values) into an array of simple javascript objects with key and value properties.

    Parameters

    • sourceObject: Map<any, any>
    • typeDescriptor: MapTypeDescriptor
    • memberName: string
    • serializer: Serializer
    • Optional memberOptions: ObjectMemberMetadata
    • Optional serializerOptions: any

    Returns IndexedObject | {
        key: any;
        value: any;
    }[]

  • Performs the conversion of a set of typed objects (or primitive values) into an array of simple javascript objects.

    Parameters

    • sourceObject: Set<any>
    • typeDescriptor: SetTypeDescriptor
    • memberName: string
    • serializer: Serializer
    • Optional memberOptions: ObjectMemberMetadata
    • Optional serializerOptions: any

    Returns any[]

  • Parameters

    • sourceObject: any
    • typeDescriptor: TypeDescriptor
    • Optional memberName: string
    • Optional memberOptions: ObjectMemberMetadata
    • Optional serializerOptions: any

    Returns any