Class Serializer
An interface for serializing and deserializing JSON objects.
Inheritance
System.Object
Serializer
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Microsoft.Graph.CoreSDK.Serialization
Assembly: Microsoft.Graph.CoreSDK.dll
Syntax
public class Serializer : ISerializer
Constructors
View SourceSerializer(Boolean)
Initializes a new instance of the Serializer class.
Declaration
public Serializer(bool pretty = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | pretty | If set to |
Properties
View SourceJsonSerializerSettings
Gets the JSON serializer settings.
Declaration
public JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.JsonSerializerSettings |
Methods
View SourceDeserializeObject<T>(Stream)
Deserializes the stream to an object of the specified type.
Declaration
public T DeserializeObject<T>(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream to deserialize. |
Returns
Type | Description |
---|---|
T | The deserialized object. |
Type Parameters
Name | Description |
---|---|
T | The deserialization type. |
DeserializeObject<T>(String)
Deserializes the JSON string to an object of the specified type.
Declaration
public T DeserializeObject<T>(string inputString)
Parameters
Type | Name | Description |
---|---|---|
System.String | inputString | The JSON string to deserialize. |
Returns
Type | Description |
---|---|
T | The deserialized object. |
Type Parameters
Name | Description |
---|---|
T | The deserialization type. |
SerializeObject(Object)
Serializes the specified object into a JSON string.
Declaration
public string SerializeObject(object serializeableObject)
Parameters
Type | Name | Description |
---|---|---|
System.Object | serializeableObject | The object to serialize. |
Returns
Type | Description |
---|---|
System.String | The JSON string. |