Json.NET - Quick Starts & API Documentation
SerializeXNode Method (node, formatting, omitRootObject)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeXNode(XObject, Formatting, Boolean)
Serializes the XNode to a JSON string.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static string SerializeXNode( XObject node, Formatting formatting, bool omitRootObject )
Public Shared Function SerializeXNode ( _ node As XObject, _ formatting As Formatting, _ omitRootObject As Boolean _ ) As String
public: static String^ SerializeXNode( XObject^ node, Formatting formatting, bool omitRootObject )
Parameters
- node (XObject)
- The node to serialize.
- formatting (Formatting)
- Indicates how the output is formatted.
- omitRootObject (Boolean)
- Omits writing the root object.
Return Value
A JSON string of the XNode.