Click or drag to resize
Json.NET

XmlNodeConverter Class

 
Converts XML to and from JSON.
Inheritance Hierarchy
SystemObject
  Newtonsoft.JsonJsonConverter
    Newtonsoft.Json.ConvertersXmlNodeConverter

Namespace:  Newtonsoft.Json.Converters
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax
C#
public class XmlNodeConverter : JsonConverter

The XmlNodeConverter type exposes the following members.

Constructors
  NameDescription
Public methodXmlNodeConverter
Initializes a new instance of the XmlNodeConverter class
Top
Properties
  NameDescription
Public propertyCanRead
Gets a value indicating whether this JsonConverter can read JSON.
(Inherited from JsonConverter.)
Public propertyCanWrite
Gets a value indicating whether this JsonConverter can write JSON.
(Inherited from JsonConverter.)
Public propertyDeserializeRootElementName
Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
Public propertyEncodeSpecialCharacters
Gets or sets a value indicating whether to encode special characters when converting JSON to XML. If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify XML namespaces, attributes or processing directives. Instead special characters are encoded and written as part of the XML element name.
Public propertyOmitRootObject
Gets or sets a value indicating whether to write the root JSON object.
Public propertyWriteArrayAttribute
Gets or sets a value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON.
Top
Methods
  NameDescription
Public methodCanConvert
Determines whether this instance can convert the specified value type.
(Overrides JsonConverterCanConvert(Type).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReadJson
Reads the JSON representation of the object.
(Overrides JsonConverterReadJson(JsonReader, Type, Object, JsonSerializer).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteJson
Writes the JSON representation of the object.
(Overrides JsonConverterWriteJson(JsonWriter, Object, JsonSerializer).)
Top
See Also