The ToJSON methods return a JSON string that represents the BrowserHawk properties and their associated values for the current browser request. It also supports the ability to add your own data names and values. This JSON can then be used for various purposes, such as storing it to a database or using it as a JSON data source.
Tip: See the toJSON-toXML.aspx sample included with BrowserHawk for more information.
Syntax:
bhObj.ToJSON()
Returns a JSON representation of all the BrowserObj properties and their associated values. A "BrowserHawk" element includes metadata about the capture including the BrowserHawk version, license level installed, edition, BDD version, and timestamp in the ISO 8601 format.
bhObj.ToXML(System.Collections.Hashtable)
Returns a JSON representation of all the BrowserObj properties and their associated values. A "BrowserHawk" element includes metadata about the capture including the BrowserHawk version, license level installed, edition, BDD version, and timestamp in the ISO 8601 format. If you pass a Hashtable object it will add a "UserProperties" attribute with your own data names and values, for example a user's login ID or department.
static BrowserObj.ToXML(BrowserObj, ExtendedBrowserObj)
Returns a JSON representation of all the BrowserObj properties and their associated values for the BrowserObj, plus all the tested Extended properties and their associated values for the ExtendedBrowserObj. A "BrowserHawk" element includes metadata about the capture including the BrowserHawk version, license level installed, edition, BDD version, and timestamp in the ISO 8601 format.
static BrowserObj.ToXML(BrowserObj, ExtendedBrowserObj, HashTable)
Returns a JSON representation of all the BrowserObj properties and their associated values for the BrowserObj, plus all the tested Extended properties and their associated values for the ExtendedBrowserObj. A "BrowserHawk" element includes metadata about the capture including the BrowserHawk version, license level installed, edition, BDD version, and timestamp in the ISO 8601 format. If you pass in a Hashtable object it will add a "UserProperties" attribute with your own data names and values, for example a user's login ID or department.
Seel Also:
ExtendedBrowserObj ToJSON Method (.NET)
BrowserObj ToXML Method (.NET)