Interface representing the return type of the builder function entitySerializer.

interface EntitySerializer {
    serializeComplexType: (<ComplexTypeNamespaceT>(fieldValue: any, complexTypeNameSpace: ComplexTypeNamespaceT) => any);
    serializeEntity: (<EntityT>(entity: EntityT, entityApi: EntityApi<EntityT, any>, diff?: boolean) => Record<string, any>);
    serializeEntityNonCustomFields: (<EntityT>(entity: EntityT, entityApi: EntityApi<EntityT, any>) => Record<string, any>);
}

Properties

serializeComplexType: (<ComplexTypeNamespaceT>(fieldValue: any, complexTypeNameSpace: ComplexTypeNamespaceT) => any)

Method to serialize a complex type to JSON.

serializeEntity: (<EntityT>(entity: EntityT, entityApi: EntityApi<EntityT, any>, diff?: boolean) => Record<string, any>)

Converts an instance of an entity class into a JSON payload to be sent to an OData service.

serializeEntityNonCustomFields: (<EntityT>(entity: EntityT, entityApi: EntityApi<EntityT, any>) => Record<string, any>)

Like EntitySerializer#serializeEntity ignoring custom fields.

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