 | JsonConvert.SerializeObject Method (Object, Formatting,JsonConverter[]) |
Serializes the specified object to a JSON string using a collection of
JsonConverter.
Namespace: Newtonsoft.JsonAssembly: SimplSharpNewtonsoft (in SimplSharpNewtonsoft.dll)
Syntaxpublic static string SerializeObject(
Object value,
Formatting formatting,
params JsonConverter[] converters
)
Parameters
- value
- Type: System.Object
The object to serialize. - formatting
- Type: Newtonsoft.Json.Formatting
Indicates how the output is formatted. - converters
- Type:Newtonsoft.Json.JsonConverter[]
A collection converters used while serializing.
Return Value
Type:
StringA JSON string representation of the object.
See Also