Represents a set of functions for serialization, deserialization and optionally serialization for URIs. The return type of the deserialize function is the type of the input to the serialize and serializeToUri functions.

Type Parameters

  • DeserializedT

    The return type of deserialize and input of serialize and serilizeToUri.

Hierarchy

  • DeSerializer

Properties

deserialize: ((value: any) => DeserializedT)

Type declaration

    • (value: any): DeserializedT
    • Function to deserialize a value which is usually a string.

      Returns

      Deserialized value.

      Parameters

      • value: any

        Serialized value to deserialize.

      Returns DeserializedT

serialize: ((value: DeserializedT) => any)

Type declaration

    • (value: DeserializedT): any
    • Function to serialize a value.

      Returns

      Serialized value.

      Parameters

      • value: DeserializedT

        Deserialized value to serialize.

      Returns any

serializeToUri?: ((value: DeserializedT, serialize: ((value: DeserializedT) => any)) => string)

Type declaration

    • (value: DeserializedT, serialize: ((value: DeserializedT) => any)): string
    • Function to serialize a value for use in a URI. This function is optional. If not specified, the serialize function will be used.

      Returns

      Serialized value for URIs.

      Parameters

      • value: DeserializedT

        Deserialized value to serialize.

      • serialize: ((value: DeserializedT) => any)

        A reference to the serialize function which is usually used to serialize the payload.

          • (value: DeserializedT): any
          • Function to serialize a value.

            Returns

            Serialized value.

            Parameters

            • value: DeserializedT

              Deserialized value to serialize.

            Returns any

      Returns string

Copyright Ⓒ 2023 SAP SE or an SAP affiliate company. All rights reserved.