Show / Hide Table of Contents

Class LONFTokenConverter

BaseLedgerEntry json converter

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

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.Methods.NFToken>.CanConvert(System.Type)
| Edit this page View Source

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

NFToken

Overrides
System.Text.Json.Serialization.JsonConverter<Xrpl.Models.Methods.NFToken>.Read(ref System.Text.Json.Utf8JsonReader, System.Type, System.Text.Json.JsonSerializerOptions)
| Edit this page View Source

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
JsonConverter<NFToken>.Write(Utf8JsonWriter, NFToken, JsonSerializerOptions)
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.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX