Response ContentAsJson Property C# API
Gets a OnlineNewtonsoft JSON object representation of this Response.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.5.77 (1.0.0.0)
Syntax

public JObject ContentAsJson { get; }

Field Value

A Newtonsoft JSON object representation of this Response.
Exceptions

ExceptionCondition
System ExceptionUnable to convert response into a JSON object
Examples

The following example demonstrates iterating through the elements of the JSON content of a Response.
using Newtonsoft.Json.Linq;
...
Response response = request.Send();
Newtonsoft.Json.Linq.JObject jsonObject = response.ContentAsJson;
foreach (KeyValuePair<string, Newtonsoft.Json.Linq.JToken> item in jsonObject)
{
    WriteMessage(String.Format("Key: {0}, value: {1}", item.Key, item.Value));
}
See Also