A JsonConverter that converts IWeightedValue<T> instances into JSON data.
| override bool FiftyOne.Pipeline.JsonBuilder.Converters.WeightedValueConverter.CanConvert |
( |
Type | objectType | ) |
|
Returns true if the converter can convert objects of the supplied type.
- Parameters
-
| objectType | The type to check against. |
- Returns
- True if the converter can convert the supplied type. False if not.
| override object FiftyOne.Pipeline.JsonBuilder.Converters.WeightedValueConverter.ReadJson |
( |
JsonReader | reader, |
|
|
Type | objectType, |
|
|
object | existingValue, |
|
|
JsonSerializer | serializer ) |
Convert the data from the given reader.
- Parameters
-
| reader | The reader to read from. |
| objectType | The type of the object to return. |
| existingValue | ?? |
| serializer | The serializer to use when reading the JSON. |
- Returns
- The data object.
| override void FiftyOne.Pipeline.JsonBuilder.Converters.WeightedValueConverter.WriteJson |
( |
JsonWriter | writer, |
|
|
object | value, |
|
|
JsonSerializer | serializer ) |
Write the given value to JSON.
- Parameters
-
| writer | The writer to use when writing the output. |
| value | The value to be converted to JSON |
| serializer | Not used. |
- Exceptions
-
| ArgumentNullException | Thrown if one of the supplied parameters is null. |