Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Newtonsoft.​Json.​Converters.​DiscriminatedUnionConverter
Assembly: Newtonsoft.Json
Inheritance: object → JsonConverter → DiscriminatedUnionConverter
Converts a F# discriminated union type to and from JSON.
Properties
public
bool
CanRead
Gets a value indicating whether this <see cref="T:Newtonsoft.Json.JsonConverter" /> can read JSON.
public
bool
CanWrite
Gets a value indicating whether this <see cref="T:Newtonsoft.Json.JsonConverter" /> can write JSON.
Methods
public
void
WriteJson​(JsonWriter writer,
object value,
JsonSerializer serializer)
Writes the JSON representation of the object.
writer
The <see cref="T:Newtonsoft.Json.JsonWriter" /> to write to.
value
The value.
serializer
The calling serializer.
public
object
ReadJson​(JsonReader reader,
System.​Type objectType,
object existingValue,
JsonSerializer serializer)
Reads the JSON representation of the object.
Returns The object value.
reader
The <see cref="T:Newtonsoft.Json.JsonReader" /> to read from.
objectType
Type of the object.
existingValue
The existing value of object being read.
serializer
The calling serializer.
public
bool
CanConvert​(System.​Type objectType)
Determines whether this instance can convert the specified object type.
Returns <c>true</c> if this instance can convert the specified object type; otherwise, <c>false</c> .
objectType
Type of the object.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object