Show / Hide Table of Contents

Class HexStringDictionaryToBytesConverter

Converts a JSON object whose values are hex-encoded byte strings into a Dictionary<TKey, TValue> keyed by the raw property name, with the values decoded to ReadOnlyMemory<T> of bytes. Keys are preserved as their on-the-wire string form (hex values for EVM storage keys are conventionally displayed as hex, so this avoids a lossy round-trip through decoded bytes).

Inheritance
object
JsonConverter
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>
HexStringDictionaryToBytesConverter
Inherited Members
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>.CanConvert(Type)
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>.Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>.ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>.Write(Utf8JsonWriter, Dictionary<string, ReadOnlyMemory<byte>>, JsonSerializerOptions)
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>.WriteAsPropertyName(Utf8JsonWriter, Dictionary<string, ReadOnlyMemory<byte>>, JsonSerializerOptions)
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>.HandleNull
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>.Type
JsonConverter.CanConvert(Type)
JsonConverter.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 HexStringDictionaryToBytesConverter : JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>

Methods

| Edit this page View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type Dictionary<string, ReadOnlyMemory<byte>>.

Declaration
public override Dictionary<string, ReadOnlyMemory<byte>> 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
Dictionary<string, ReadOnlyMemory<byte>>

The converted value.

Overrides
JsonConverter<Dictionary<string, ReadOnlyMemory<byte>>>.Read(ref Utf8JsonReader, Type, JsonSerializerOptions)
| Edit this page View Source

Write(Utf8JsonWriter, Dictionary<string, ReadOnlyMemory<byte>>, JsonSerializerOptions)

Writes a specified value as JSON.

Declaration
public override void Write(Utf8JsonWriter writer, Dictionary<string, ReadOnlyMemory<byte>> value, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonWriter writer

The writer to write to.

Dictionary<string, ReadOnlyMemory<byte>> value

The value to convert to JSON.

JsonSerializerOptions options

An object that specifies serialization options to use.

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