Show / Hide Table of Contents

Class NullableEvmAddressConverter

Nullable EVM-address converter that preserves an explicit wire-null as a C# null, rather than coercing it to None (the all-zeros sentinel). The plain EvmAddressConverter collapses both forms — useful when the server never sends null — but on endpoints that do send null to distinguish "no address" from "the literal zero address" (e.g. contract-action to fields, where CREATE actions can leave the recipient null), use this converter.

Inheritance
object
JsonConverter
JsonConverter<EvmAddress>
NullableEvmAddressConverter
Inherited Members
JsonConverter<EvmAddress>.CanConvert(Type)
JsonConverter<EvmAddress>.ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)
JsonConverter<EvmAddress>.WriteAsPropertyName(Utf8JsonWriter, EvmAddress, JsonSerializerOptions)
JsonConverter<EvmAddress>.HandleNull
JsonConverter<EvmAddress>.Type
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Hiero.Converters
Assembly: Hiero.dll
Syntax
public sealed class NullableEvmAddressConverter : JsonConverter<EvmAddress?>

Methods

| Edit this page View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type EvmAddress.

Declaration
public override EvmAddress? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonReader reader

The reader.

Type typeToConvert

The type to convert.

JsonSerializerOptions options

An object that specifies serialization options to use.

Returns
Type Description
EvmAddress

The converted value.

Overrides
JsonConverter<EvmAddress>.Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
| Edit this page View Source

Write(Utf8JsonWriter, EvmAddress?, JsonSerializerOptions)

Writes a specified value as JSON.

Declaration
public override void Write(Utf8JsonWriter writer, EvmAddress? evmAddress, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonWriter writer

The writer to write to.

EvmAddress evmAddress
JsonSerializerOptions options

An object that specifies serialization options to use.

Overrides
JsonConverter<EvmAddress>.Write(Utf8JsonWriter, EvmAddress, JsonSerializerOptions)
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph