Skip to main content

Class: JsonPayloadConverter

common.JsonPayloadConverter

Converts between non-undefined values and serialized JSON Payload

Implements

Constructors

constructor

new JsonPayloadConverter(): JsonPayloadConverter

Returns

JsonPayloadConverter

Properties

encodingType

encodingType: "json/plain"

Implementation of

PayloadConverterWithEncoding.encodingType

Methods

fromPayload

fromPayload<T>(content): T

Converts a Payload back to a value.

Type parameters

Name
T

Parameters

NameType
contentIPayload

Returns

T

Implementation of

PayloadConverterWithEncoding.fromPayload


toPayload

toPayload(value): undefined | IPayload

Converts a value to a Payload.

Parameters

NameTypeDescription
valueunknownThe value to convert. Example values include the Workflow args sent from the Client and the values returned by a Workflow or Activity.

Returns

undefined | IPayload

The Payload, or undefined if unable to convert.

Implementation of

PayloadConverterWithEncoding.toPayload