<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

XmlNodeConverter

Converts XML to and from JSON.
public string DeserializeRootElementName { get; set; }

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 bool EncodeSpecialCharacters { get; set; }

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 bool OmitRootObject { get; set; }

Gets or sets a value indicating whether to write the root JSON object.

public bool WriteArrayAttribute { get; set; }

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.