[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
Section titled “Parameters”| Parameter | Type | 
|---|---|
| program | Program | 
| value | Value | 
| type | Type | 
| encodeAs? | EncodeData | 
Returns
Section titled “Returns”unknown