| JsonConvertSerializeXNode Method (XObject, Formatting, Boolean) |
Serializes the
XNode to a JSON string using formatting and omits the root object if
omitRootObject is
true.
Namespace:
Newtonsoft.Json
Assembly:
Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax public static string SerializeXNode(
XObject node,
Formatting formatting,
bool omitRootObject
)
Parameters
- node
- Type: System.Xml.LinqXObject
The node to serialize. - formatting
- Type: Newtonsoft.JsonFormatting
Indicates how the output should be formatted. - omitRootObject
- Type: SystemBoolean
Omits writing the root object.
Return Value
Type:
StringA JSON string of the
XNode.
See Also