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