Class NameValueCollectionConverter
Custom converter for (de)serializing NameValueCollection
Inheritance
System.Object
NameValueCollectionConverter
Namespace: EPiServer.Framework.Serialization.Json
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public class NameValueCollectionConverter : JsonConverter
Constructors
NameValueCollectionConverter()
Declaration
public NameValueCollectionConverter()
Methods
CanConvert(Type)
Determines whether this instance can convert the specified object type.
Declaration
public override bool CanConvert(Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System. |
objectType | Type of the object. |
Returns
Type | Description |
---|---|
System. |
|
ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the JSON representation of the object.
Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft. |
reader | The Newtonsoft. |
System. |
objectType | Type of the object. |
System. |
existingValue | The existing value of object being read. |
Newtonsoft. |
serializer | The calling serializer. |
Returns
Type | Description |
---|---|
System. |
The object value. |
WriteJson(JsonWriter, Object, JsonSerializer)
Writes the JSON representation of the object.
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft. |
writer | The Newtonsoft. |
System. |
value | The value. |
Newtonsoft. |
serializer | The calling serializer. |