Click or drag to resize
Json.NET

JsonConvertDeserializeXNode Method (String, String, Boolean)

 
Deserializes the XNode from a JSON string nested in a root element specified by deserializeRootElementName and writes a Json.NET array attribute for collections.

Namespace:  Newtonsoft.Json
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax
C#
public static XDocument DeserializeXNode(
	string value,
	string deserializeRootElementName,
	bool writeArrayAttribute
)

Parameters

value
Type: SystemString
The JSON string.
deserializeRootElementName
Type: SystemString
The name of the root element to append when deserializing.
writeArrayAttribute
Type: SystemBoolean
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.

Return Value

Type: XDocument
The deserialized XNode.
See Also