Class ConsensusNodeEndpointConverter
Converts a ConsensusNodeEndpoint to and from a JSON object
with address (node id) and url properties, plus an optional
certHash property holding the TLS certificate hash as hex
(written in lowercase, and only when the endpoint has one).
Inheritance
ConsensusNodeEndpointConverter
Inherited Members
Namespace: Hiero.Converters
Assembly: Hiero.dll
Syntax
public sealed class ConsensusNodeEndpointConverter : JsonConverter<ConsensusNodeEndpoint>
Methods
| Edit this page View SourceRead(ref Utf8JsonReader, Type, JsonSerializerOptions)
Reads and converts the JSON to type ConsensusNodeEndpoint.
Declaration
public override ConsensusNodeEndpoint? 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 |
|---|---|
| ConsensusNodeEndpoint | The converted value. |
Overrides
| Edit this page View SourceWrite(Utf8JsonWriter, ConsensusNodeEndpoint, JsonSerializerOptions)
Writes a specified value as JSON.
Declaration
public override void Write(Utf8JsonWriter writer, ConsensusNodeEndpoint gateway, JsonSerializerOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Utf8JsonWriter | writer | The writer to write to. |
| ConsensusNodeEndpoint | gateway | |
| JsonSerializerOptions | options | An object that specifies serialization options to use. |