Show / Hide Table of Contents

    Class ODataJsonConverter

    Handles resolving interfaces to the correct derived class during serialization/deserialization.

    Inheritance
    Object
    ODataJsonConverter
    Namespace: Microsoft.Graph.Communications.Common.OData
    Assembly: Microsoft.Graph.Communications.Common.dll
    Syntax
    public sealed class ODataJsonConverter : JsonConverter

    Constructors

    ODataJsonConverter(Assembly[])

    Initializes a new instance of the ODataJsonConverter class.

    Declaration
    public ODataJsonConverter(params Assembly[] typeAssemblies)
    Parameters
    Type Name Description
    Assembly[] typeAssemblies

    The type assemblies.

    Properties

    CanWrite

    Declaration
    public override bool CanWrite { get; }
    Property Value
    Type Description
    Boolean

    Methods

    CanConvert(Type)

    Declaration
    public override bool CanConvert(Type objectType)
    Parameters
    Type Name Description
    Type objectType
    Returns
    Type Description
    Boolean

    ReadJson(JsonReader, Type, Object, JsonSerializer)

    Deserializes the object to the correct type.

    Declaration
    public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
    Parameters
    Type Name Description
    Newtonsoft.Json.JsonReader reader

    The Newtonsoft.Json.JsonReader to read from.

    Type objectType

    The interface type.

    Object existingValue

    The existing value of the object being read.

    Newtonsoft.Json.JsonSerializer serializer

    The Newtonsoft.Json.JsonSerializer for deserialization.

    Returns
    Type Description
    Object

    The deserialized object

    WriteJson(JsonWriter, Object, JsonSerializer)

    Declaration
    public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
    Parameters
    Type Name Description
    Newtonsoft.Json.JsonWriter writer
    Object value
    Newtonsoft.Json.JsonSerializer serializer

    Extension Methods

    AdditionalDataExtensions.SetInAdditionalData(Object, String, Object)
    Extensions.Pin(Object)
    Extensions.ChangeType(Object, Type)
    Extensions.ChangeType<T>(Object)
    Extensions.TryDispose(Object, IGraphLogger)
    ReflectionUtils.GetPropertyUsingReflection(Object, String)
    ReflectionUtils.SetPropertyUsingReflection(Object, String, Object)
    Validator.IsNull(Object, String, String)
    Validator.NotNull<T>(T, String, String)
    Validator.Equals<T>(T, T, String, String)
    Validator.Equals<T, TE>(T, T, String)
    Validator.NotEquals<T>(T, T, String, String)
    Back to top Copyright (c) Microsoft Corporation. All rights reserved.