Appearance
DeserializeAsync Method
Definition
- Namespace:
JASE.Serializers - Assembly:
JASE.Serializers.dll
Overloads
| Name | Description |
|---|---|
Task<T> DeserializeAsync(Stream json, JsonSerializerOptions options = null, CancellationToken cancellationToken = null) | Asynchronously deserialize JSON from a Stream into an object of type T. |
Task<object> DeserializeAsync(Stream json, Type type, JsonSerializerOptions options = null, CancellationToken cancellationToken = null) | Asynchronously deserialize JSON from a Stream into an object of the specified type. |
Task<object> DeserializeAsync(Stream json, Type type, JsonSerializerOptions options = null, CancellationToken cancellationToken = null)
csharp
Task<object> DeserializeAsync(Stream json, Type type, JsonSerializerOptions options = null, CancellationToken cancellationToken = null)Asynchronously deserialize JSON from a Stream into an object of the specified type.
Parameters
| Name | Description |
|---|---|
cancellationToken | A token to cancel the asynchronous operation. |
json | A stream containing UTF-8 encoded JSON. |
options | Optional JsonSerializerOptions; if null, uses library defaults. |
type | The type to deserialize to. |
Returns
A task that represents the asynchronous deserialize operation.
Task<T> DeserializeAsync(Stream json, JsonSerializerOptions options = null, CancellationToken cancellationToken = null)
csharp
Task<T> DeserializeAsync(Stream json, JsonSerializerOptions options = null, CancellationToken cancellationToken = null)Asynchronously deserialize JSON from a Stream into an object of type T.
Type parameters
| Name | Description |
|---|---|
T | The type to deserialize to. |
Parameters
| Name | Description |
|---|---|
cancellationToken | A token to cancel the asynchronous operation. |
json | A stream containing UTF-8 encoded JSON. |
options | Optional JsonSerializerOptions; if null, uses library defaults. |
Returns
A task that represents the asynchronous deserialize operation.