Show / Hide Table of Contents

Class Serializer

An interface for serializing and deserializing JSON objects.

Inheritance
System.Object
Serializer
Implements
ISerializer
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 Source

Serializer(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 true make the formatting pretty.

Properties

View Source

JsonSerializerSettings

Gets the JSON serializer settings.

Declaration
public JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Type Description
Newtonsoft.Json.JsonSerializerSettings

Methods

View Source

DeserializeObject<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.

View Source

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.

View Source

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.

Implements

ISerializer
  • View Source
Back to top Generated by DocFX