Table of Contents

Class FeedModeJsonConverter

Namespace
DatabentoDotNet.Historical.Json
Assembly
DatabentoDotNet.Historical.dll

Reads and writes FeedMode as its wire string.

public sealed class FeedModeJsonConverter : JsonConverter<FeedMode>
Inheritance
FeedModeJsonConverter
Inherited Members

Remarks

Upstream gives this enum a Deserialize impl and no Serialize (metadata.rs:393-398), because the client only ever receives one. Write(Utf8JsonWriter, FeedMode, JsonSerializerOptions) exists so the type is usable in a consumer's own serialization; nothing in this library calls it.

Methods

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type FeedMode.

public override FeedMode 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

FeedMode

The converted value.

Write(Utf8JsonWriter, FeedMode, JsonSerializerOptions)

Writes a specified value as JSON.

public override void Write(Utf8JsonWriter writer, FeedMode value, JsonSerializerOptions options)

Parameters

writer Utf8JsonWriter

The writer to write to.

value FeedMode

The value to convert to JSON.

options JsonSerializerOptions

An object that specifies serialization options to use.