Show / Hide Table of Contents

Class TransactionOrHashConverter

Hash Or Transaction json converter

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

Methods

| Edit this page View Source

CanConvert(Type)

Determines whether the specified type can be converted.

Declaration
public override bool CanConvert(Type typeToConvert)
Parameters
Type Name Description
Type typeToConvert

The type to compare against.

Returns
Type Description
bool

true if the type can be converted; otherwise, false.

Overrides
System.Text.Json.Serialization.JsonConverter<Xrpl.Models.Ledger.HashOrTransaction>.CanConvert(System.Type)
| Edit this page View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

read HashOrTransaction from json object

Declaration
public override HashOrTransaction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonReader reader
Type typeToConvert
JsonSerializerOptions options
Returns
Type Description
HashOrTransaction
Overrides
System.Text.Json.Serialization.JsonConverter<Xrpl.Models.Ledger.HashOrTransaction>.Read(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)
| Edit this page View Source

Write(Utf8JsonWriter, HashOrTransaction, JsonSerializerOptions)

Writes a HashOrTransaction to JSON. If the transaction hash is set, writes just the hash string. Otherwise, writes the full transaction object.

Declaration
public override void Write(Utf8JsonWriter writer, HashOrTransaction value, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonWriter writer
HashOrTransaction value
JsonSerializerOptions options
Overrides
JsonConverter<HashOrTransaction>.Write(Utf8JsonWriter, HashOrTransaction, JsonSerializerOptions)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX