C# Class OpenQA.Selenium.Remote.DesiredCapabilitiesJsonConverter

Provides a way to convert DesiredCapabilities objects to JSON and back
Inheritance: Newtonsoft.Json.JsonConverter
ファイルを表示 Open project: asynchrony/Selenium2

Public Methods

Method Description
CanConvert ( Type objectType ) : bool

Checks if the object can be converted

ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object

Get the capabilities from the JSON reader

WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void

Creates a JSON string representing the DesiredCapabilities object

Method Details

CanConvert() public method

Checks if the object can be converted
public CanConvert ( Type objectType ) : bool
objectType System.Type Type of the object
return bool

ReadJson() public method

Get the capabilities from the JSON reader
public ReadJson ( JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer ) : object
reader Newtonsoft.Json.JsonReader JSON Reader instance
objectType System.Type Object type being read
existingValue object The exisiting value of the object
serializer Newtonsoft.Json.JsonSerializer JSON Serializer instance
return object

WriteJson() public method

Creates a JSON string representing the DesiredCapabilities object
public WriteJson ( JsonWriter writer, object value, JsonSerializer serializer ) : void
writer Newtonsoft.Json.JsonWriter The JSON writer with a string
value object Value of the string
serializer Newtonsoft.Json.JsonSerializer JSON serializer instance
return void