[F] serializeValueAsJson
function serializeValueAsJson(   program,   value,   type,   encodeAs?): unknownSerialize 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
| Parameter | Type | 
|---|---|
program | Program | 
value | Value | 
type | Type | 
encodeAs? | EncodeData | 
Returns
unknown