While serializing Task or Task,Utf8Json's builtin task formatter calls Task.Wait() or Task.Result.
It causes exception while the task was cancelled or failed.
This means we almost impossible to serialize TaskCancelledException,
and any other struct or class which contains cancelled or failed task in their fields.
While serializing Task or Task,Utf8Json's builtin task formatter calls Task.Wait() or Task.Result.
It causes exception while the task was cancelled or failed.
This means we almost impossible to serialize TaskCancelledException, and any other struct or class which contains cancelled or failed task in their fields.