ConvertDirection

[ Enumeration ]

export enum ConvertDirection {
    Forward,
    Backward
}

Defines the direction of a conversion in ValueConverter. This is necessary if a schema contains conversion rules.

Sample:

If special numerical values such as "NaN", "Infinity" or "-Infinity" are to be exchanged between the server and the framework, only the transfer of these values as a string remains in JSON format, since the JSON specification does not provide these special values for numbers. In the framework, however, these are to be mapped as values of Number.

This is described in the JSON schema as follows:

{
    "type": "string",
    "enum": ["NaN", "Infinity", "-Infinity"],
    "convert": "number"
}

If Forward is defined as ConvertDirection for the conversion, a conversion to Number.NaN, Number.INFINITY or Number.NEGATIVE_INFINITY will be performed if the type string has the value "NaN", "Infinity" or "-Infinity".

If Backward is defined as ConvertDirection for the conversion, a conversion to the string "NaN", "Infinity" or "-Infinity" will be performed for a number type with the value Number.NaN, Number.INFINITY or Number.NEGATIVE_INFINITY.

Values

Name

Value

Description

Forward

0

Forward

Backward

1

Backward

ConvertDirection 1:

Available from version 1.12