Show / Hide Table of Contents

Class LedgerEntryTypeConverter

Converts LedgerEntryType enum to/from JSON strings. Unknown enum values are deserialized as Unknown instead of throwing, preserving forward compatibility with new ledger object types.

Inheritance
object
JsonConverter
JsonConverter<LedgerEntryType>
LedgerEntryTypeConverter
Namespace: Xrpl.Client.Json.Converters
Assembly: Xrpl.dll
Syntax
public class LedgerEntryTypeConverter : JsonConverter<LedgerEntryType>

Methods

| Edit this page View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type LedgerEntryType.

Declaration
public override LedgerEntryType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonReader reader

The reader.

Type typeToConvert

The type to convert.

JsonSerializerOptions options

An object that specifies serialization options to use.

Returns
Type Description
LedgerEntryType

The converted value.

Overrides
System.Text.Json.Serialization.JsonConverter<Xrpl.Models.LedgerEntryType>.Read(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)
| Edit this page View Source

Write(Utf8JsonWriter, LedgerEntryType, JsonSerializerOptions)

Writes a specified value as JSON.

Declaration
public override void Write(Utf8JsonWriter writer, LedgerEntryType value, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonWriter writer

The writer to write to.

LedgerEntryType value

The value to convert to JSON.

JsonSerializerOptions options

An object that specifies serialization options to use.

Overrides
JsonConverter<LedgerEntryType>.Write(Utf8JsonWriter, LedgerEntryType, JsonSerializerOptions)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX