Class Base64StringToBytesConverter
JSON converter that reads base64-encoded strings and writes them as byte arrays.
Inherited Members
Namespace: Hiero.Converters
Assembly: Hiero.dll
Syntax
public sealed class Base64StringToBytesConverter : JsonConverter<ReadOnlyMemory<byte>>
Methods
| Edit this page View SourceRead(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
| Edit this page View SourceWrite(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. |