Skip to content

[F] serializeValueAsJson

function serializeValueAsJson(
program,
value,
type,
encodeAs?): unknown

Serialize the given TypeSpec value as a JSON object using the given type and its encoding annotations. The Value MUST be assignable to the given type.

Parameters

ParameterType
programProgram
valueValue
typeType
encodeAs?EncodeData

Returns

unknown