Class LedgerIndexConverter
LedgerIndex json converter
Namespace: Xrpl.Client.Json.Converters
Assembly: Xrpl.dll
Syntax
public class LedgerIndexConverter : JsonConverter<LedgerIndex>
Methods
| Edit this page View SourceRead(ref Utf8JsonReader, Type, JsonSerializerOptions)
read LedgerIndex from json object
Declaration
public override LedgerIndex Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonReader | reader | json reader |
| Type | typeToConvert | target type |
| JsonSerializerOptions | options | json serializer options |
Returns
| Type | Description |
|---|---|
| LedgerIndex |
Overrides
System.Text.Json.Serialization.JsonConverter<Xrpl.Models.Common.LedgerIndex>.Read(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)
Exceptions
| Type | Condition |
|---|---|
| JsonException | Cannot convert value |
Write(Utf8JsonWriter, LedgerIndex, JsonSerializerOptions)
write LedgerIndex to json object
Declaration
public override void Write(Utf8JsonWriter writer, LedgerIndex value, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | writer |
| LedgerIndex | value | LedgerIndex object |
| JsonSerializerOptions | options | json serializer options |
Overrides
Exceptions
| Type | Condition |
|---|---|
| JsonException | Cannot write this object type |