Json.NET - Quick Starts & API Documentation
SerializeObject Method (value, formatting)
Namespaces ► Newtonsoft.Json ► JsonConvert ► SerializeObject(Object, Formatting)
Serializes the specified object to a JSON string.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static string SerializeObject( Object value, Formatting formatting )
Public Shared Function SerializeObject ( _ value As Object, _ formatting As Formatting _ ) As String
public: static String^ SerializeObject( Object^ value, Formatting formatting )
Parameters
- value (Object)
- The object to serialize.
- formatting (Formatting)
- Indicates how the output is formatted.
Return Value
A JSON string representation of the object.