SerializationUtils.SerializeToJson Method
- Namespace:
- Weavy.Core.Utils
- Assembly:
- Weavy.Core.dll
SerializeToJson(object, Formatting?, JsonSerializerSettings)
Serializes an object, or graph of connected objects, to a json string.
Uses JSON.NET.
public static string SerializeToJson(this object graph, Formatting? formatting = default(Formatting? ), JsonSerializerSettings settings = null)
Parameters
- graph
- object
The object that contains the data to write to the json string.
- formatting
- Newtonsoft.Json.Formatting?
The formatting options to use when serializing to json.
- settings
- Newtonsoft.Json.JsonSerializerSettings
The json serializer settings to use, null
for default settings.
Returns
string
A json representation of the graph.