Class TransactionOrHashConverter
Hash Or Transaction json converter
Namespace: Xrpl.Client.Json.Converters
Assembly: Xrpl.dll
Syntax
public class TransactionOrHashConverter : JsonConverter<HashOrTransaction>
Methods
| Edit this page View SourceCanConvert(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 |
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 |