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. |
An object of the specified type.
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. |
Use JToken as the type to parse arbitrary JSON.
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. |
An object of the specified type.
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. |