JsonWebServiceResponseUtility.GetJsonAsAsync<T> method (1 of 2)

Parses the JSON into an object of the specified type.

public static Task<T> GetJsonAsAsync<T>(this WebServiceResponse response)
parameter description
T The specified type.
response The response.

Return Value

An object of the specified type.

Exceptions

exception condition
WebServiceException The response content does not use the JSON content type, or the content is empty, or the text is not valid JSON, or the JSON cannot be deserialized into the specified type.

Remarks

Use JToken as the type to parse arbitrary JSON.

See Also


JsonWebServiceResponseUtility.GetJsonAsAsync<T> method (2 of 2)

Parses the JSON into an object of the specified type.

public static Task<T> GetJsonAsAsync<T>(this WebServiceResponse response, 
    JsonSettings? jsonSettings)
parameter description
T The specified type.
response The response.
jsonSettings The JSON settings.

Return Value

An object of the specified type.

Exceptions

exception condition
WebServiceException The response content does not use the JSON content type, or the content is empty, or the text is not valid JSON, or the JSON cannot be deserialized into the specified type.

See Also