Class ODataTimeSpanConverter
Custom json converter for TimeSpans.
Namespace: Microsoft.Graph.Communications.Common.OData
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public class ODataTimeSpanConverter : JsonConverter
Constructors
ODataTimeSpanConverter()
Declaration
public ODataTimeSpanConverter()
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 |