Class LONFTokenConverter
BaseLedgerEntry json converter
Namespace: Xrpl.Client.Json.Converters
Assembly: Xrpl.dll
Syntax
public class LONFTokenConverter : JsonConverter<NFToken>
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
Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
read BaseLedgerEntry from json object
Declaration
public override NFToken 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 |
|---|---|
| NFToken |
Overrides
Write(Utf8JsonWriter, NFToken, JsonSerializerOptions)
Writes an NFToken to JSON, wrapping it in an NFToken property. Null fields are ignored based on the serializer settings.
Declaration
public override void Write(Utf8JsonWriter writer, NFToken value, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | |
| NFToken | value | |
| JsonSerializerOptions | options |
Overrides
Remarks
The fields are written by hand rather than by re-entering the serializer. This converter is declared as a System.Text.Json.Serialization.JsonConverterAttribute on NFToken itself, and a converter attached to a type outranks System.Text.Json.JsonSerializerOptions.Converters: dropping this converter from that list — the usual way out of a recursive Write — does not stop System.Text.Json from picking it up again for the same type, so Write called itself until the writer hit MaxDepth.