FromJsonType<JsonT>: {
    [key: string]: any;
} & {
    [P in keyof PureEntityType<JsonT>]?: PureEntityType<JsonT>[P] extends (infer U)[] | null | undefined
        ? U extends Record<string, any>
            ? FromJsonType<U>[]
            : PureEntityType<JsonT>[P]
        : PureEntityType<JsonT>[P] extends Record<string, any> | null | undefined
            ? FromJsonType<PureEntityType<JsonT>[P]> | null | undefined
            : PureEntityType<JsonT>[P]

Type to describe possible inputs for .fromJson. This is based on the JSON type of an entity and allows all properties to be optional recursively. It also allows setting unknown properties, which will be treated as custom fields.

Type Parameters

  • JsonT

    JSON type of the entity.

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

Type declaration

  • [key: string]: any