Microsoft.Bot.Builder.Calling.ObjectModel.Contracts.OperationOutcomeConverter Class Reference

By default Json.net doesn't know how to deserialize JSON data into Interfaces or abstract classes. This custom Converter helps deserialize "operationOutcomes" specified in JSON into respective concrete "OperationOutcome" classes. More...

Inheritance diagram for Microsoft.Bot.Builder.Calling.ObjectModel.Contracts.OperationOutcomeConverter:

Public Member Functions

override bool CanConvert (Type objectType)
 Determines if this converted is designed to deserialization to objects of the specified type. More...
 
override object ReadJson (JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
 Parses the json to the specified type. More...
 
override void WriteJson (JsonWriter writer, object value, JsonSerializer serializer)
 Serializes to the specified type More...
 

Protected Member Functions

override OperationOutcomeBase Create (Type objectType, JObject jsonObject)
 Create an instance of objectType, based properties in the JSON object More...
 

Properties

override bool CanWrite [get]
 Let Newtonsoft.Json use the default writer More...
 

Detailed Description

By default Json.net doesn't know how to deserialize JSON data into Interfaces or abstract classes. This custom Converter helps deserialize "operationOutcomes" specified in JSON into respective concrete "OperationOutcome" classes.

Definition at line 11 of file OperationOutcomeConverter.cs.

Member Function Documentation

override bool Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T >.CanConvert ( Type  objectType)
inlineinherited

Determines if this converted is designed to deserialization to objects of the specified type.

Parameters
objectTypeThe target type for deserialization.
Returns
True if the type is supported.

Definition at line 22 of file JsonCreationConverter.cs.

override OperationOutcomeBase Microsoft.Bot.Builder.Calling.ObjectModel.Contracts.OperationOutcomeConverter.Create ( Type  objectType,
JObject  jsonObject 
)
inlineprotectedvirtual

Create an instance of objectType, based properties in the JSON object

Parameters
objectTypetype of object expected
jsonObjectcontents of JSON object that will be deserialized

Implements Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< OperationOutcomeBase >.

Definition at line 13 of file OperationOutcomeConverter.cs.

override object Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T >.ReadJson ( JsonReader  reader,
Type  objectType,
object  existingValue,
JsonSerializer  serializer 
)
inlineinherited

Parses the json to the specified type.

Parameters
readerNewtonsoft.Json.JsonReader
objectTypeTarget type.
existingValueIgnored
serializerNewtonsoft.Json.JsonSerializer to use.
Returns
Deserialized Object

Definition at line 44 of file JsonCreationConverter.cs.

override void Microsoft.Bot.Builder.Calling.ObjectModel.Misc.JsonCreationConverter< T >.WriteJson ( JsonWriter  writer,
object  value,
JsonSerializer  serializer 
)
inlineinherited

Serializes to the specified type

Parameters
writerNewtonsoft.Json.JsonWriter
valueObject to serialize.
serializerNewtonsoft.Json.JsonSerializer to use.

Definition at line 72 of file JsonCreationConverter.cs.

Property Documentation

Let Newtonsoft.Json use the default writer

Definition at line 31 of file JsonCreationConverter.cs.


The documentation for this class was generated from the following file: