Class CommsSerializer
An interface for serializing and deserializing JSON objects.
This serializer is used throughout the Communications workload
to provide extra functionality. Specifically it supports
more robust serialization/deserialization of @odata.type property
and deserialization of open type additional data.
Inheritance
CommsSerializer
Assembly: Microsoft.Graph.Communications.Core.dll
Syntax
public class CommsSerializer : ISerializer
Constructors
CommsSerializer(Boolean)
Declaration
public CommsSerializer(bool pretty = false)
Parameters
| Type |
Name |
Description |
| Boolean |
pretty |
If set to true make the formatting pretty.
|
CommsSerializer(Boolean, Assembly[])
Declaration
public CommsSerializer(bool pretty = false, params Assembly[] assemblies)
Parameters
| Type |
Name |
Description |
| Boolean |
pretty |
If set to true make the formatting pretty.
|
| Assembly[] |
assemblies |
The assemblies to use for deserialization. The CommsSerializer
searches through the specified assemblies in order specified to find the @odata.type in
the json payload.
|
Properties
CoreAssemblies
Gets the list of core Assembly detected.
Declaration
public Assembly[] CoreAssemblies { get; }
Property Value
JsonSerializerSettings
Gets the JSON serializer settings.
Declaration
public JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
| Type |
Description |
| Newtonsoft.Json.JsonSerializerSettings |
|
Methods
DeserializeObject<T>(Stream)
Declaration
public T DeserializeObject<T>(Stream stream)
Parameters
| Type |
Name |
Description |
| Stream |
stream |
|
Returns
Type Parameters
DeserializeObject<T>(String)
Declaration
public T DeserializeObject<T>(string inputString)
Parameters
| Type |
Name |
Description |
| String |
inputString |
|
Returns
Type Parameters
SerializeObject(Object)
Declaration
public string SerializeObject(object serializeableObject)
Parameters
| Type |
Name |
Description |
| Object |
serializeableObject |
|
Returns
Implements
See Also