C# Class NSwag.Integration.Console.Contracts.JsonInheritanceConverter

Inheritance: Newtonsoft.Json.JsonConverter
Mostra file Open project: NSwag/NSwag

Public Methods

Method Description
CanConvert ( System objectType ) : bool
JsonInheritanceConverter ( )
JsonInheritanceConverter ( string discriminator )
ReadJson ( Newtonsoft reader, System objectType, object existingValue, Newtonsoft serializer ) : object
WriteJson ( Newtonsoft writer, object value, Newtonsoft serializer ) : void

Private Methods

Method Description
GetObjectSubtype ( System objectType, string discriminator ) : System.Type
IsKnwonTypeTargetType ( dynamic attribute, string discriminator ) : bool

Method Details

CanConvert() public method

public CanConvert ( System objectType ) : bool
objectType System
return bool

JsonInheritanceConverter() public method

JsonInheritanceConverter() public method

public JsonInheritanceConverter ( string discriminator )
discriminator string

ReadJson() public method

public ReadJson ( Newtonsoft reader, System objectType, object existingValue, Newtonsoft serializer ) : object
reader Newtonsoft
objectType System
existingValue object
serializer Newtonsoft
return object

WriteJson() public method

public WriteJson ( Newtonsoft writer, object value, Newtonsoft serializer ) : void
writer Newtonsoft
value object
serializer Newtonsoft
return void