Click or drag to resize
Json.NET

JsonConvertSerializeObject Method (Object, Formatting)

 
Serializes the specified object to a JSON string using formatting.

Namespace:  Newtonsoft.Json
Assembly:  Newtonsoft.Json (in Newtonsoft.Json.dll) Version: 12.0.1+509643a8952ce731e0207710c429ad6e67dc43db
Syntax
C#
public static string SerializeObject(
	Object value,
	Formatting formatting
)

Parameters

value
Type: SystemObject
The object to serialize.
formatting
Type: Newtonsoft.JsonFormatting
Indicates how the output should be formatted.

Return Value

Type: String
A JSON string representation of the object.
See Also