Class DeliveryJsonConverter
- Namespace
- DatabentoDotNet.Historical.Json
- Assembly
- DatabentoDotNet.Historical.dll
Reads and writes Delivery as its wire string.
public sealed class DeliveryJsonConverter : JsonConverter<Delivery>
- Inheritance
-
DeliveryJsonConverter
- Inherited Members
Remarks
One defined value, so this converter's only interesting behaviour is the failure: an
unrecognised mechanism throws rather than reading as Download. Upstream
documents download as the only mechanism "at this time" (batch.rs:415-416), and the day
that stops being true a job delivered some other way must not come back claiming this library
can fetch its files.
Methods
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type Delivery.
public override Delivery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderThe reader.
typeToConvertTypeThe type to convert.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.
Returns
- Delivery
The converted value.
Write(Utf8JsonWriter, Delivery, JsonSerializerOptions)
Writes a specified value as JSON.
public override void Write(Utf8JsonWriter writer, Delivery value, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriterThe writer to write to.
valueDeliveryThe value to convert to JSON.
optionsJsonSerializerOptionsAn object that specifies serialization options to use.