UnsafeJsonSerializableOrUndefined

type UnsafeJsonSerializableOrUndefined: JsonSerializable | undefined;

Deprecated

Prefer using JsonSerializable directly in new code.

Any type that can be natively converted to a string with JSON.stringify, and also `undefined, which will not be converted to a string.

This type is used correctly as a nested value inside JsonArray and JsonObject, and also exists to reflect legacy behavior from before the distinction between null and undefined had been made. If you call JSON.stringify on a value with this type, it may return a valid JSON string, or it may return undefined.

If you are later attempting to parse a value serialized in this way in other parts of the application, it may not be safe to unwrap or parse that value.