Member group
ReadFromJson
Declaring type: HttpContentJsonExtensions
Module: System.Web.Http.Json
Assembly: System.Web.dll
Overloads / Variants
ReadFromJson
func ReadFromJson(type: TypeInfo, cancellationToken: CancellationToken = default) -> Task<Result<object, JsonError>>
Extension from HttpContentJsonExtensions.ReadFromJson
Reads JSON using a runtime type; cancellation applies to asynchronous stream reads.
Parameters
| Name | Type | Description |
|---|---|---|
self |
HttpContent | |
type |
TypeInfo | |
cancellationToken |
CancellationToken |
Return value
Task<Result<Object, JsonError>>
ReadFromJson
func ReadFromJson<T>(cancellationToken: CancellationToken = default) -> Task<Result<T, JsonError>>
Extension from HttpContentJsonExtensions.ReadFromJson
Pre-cancellation skips conversion and returns a cancelled task. Buffered conversion is synchronous and cannot be interrupted once started.
Parameters
| Name | Type | Description |
|---|---|---|
self |
HttpContent | |
cancellationToken |
CancellationToken |