Table of Contents

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

reader Utf8JsonReader

The reader.

typeToConvert Type

The type to convert.

options JsonSerializerOptions

An 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

writer Utf8JsonWriter

The writer to write to.

value Delivery

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.