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