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.

interface DeSerializer<DeserializedT> {
    deserialize: ((value) => DeserializedT);
    serialize: ((value) => any);
    serializeToUri?: ((value, serialize) => string);

Type Parameters

  • DeserializedT

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


deserialize: ((value) => DeserializedT)

Function to deserialize a value which is usually a string.

Type declaration


Deserialized value.

serialize: ((value) => any)

Function to serialize a value.

Type declaration

    • (value): any
    • Parameters

      Returns any


Serialized value.

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

Function to serialize a value for use in a URI. This function is optional. If not specified, the serialize function will be used.

Type declaration

    • (value, serialize): string
    • Parameters

      • value: DeserializedT

        Deserialized value to serialize.

      • serialize: ((value) => any)

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

      Returns string


Serialized value for URIs.

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