Show / Hide Table of Contents

Class Base64StringToBytesConverter

JSON converter that reads base64-encoded strings and writes them as byte arrays.

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

Methods

| Edit this page View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

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

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

The converted value.

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

Write(Utf8JsonWriter, ReadOnlyMemory<byte>, JsonSerializerOptions)

Writes a specified value as JSON.

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

The writer to write to.

ReadOnlyMemory<byte> bytes
JsonSerializerOptions options

An object that specifies serialization options to use.

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