Show / Hide Table of Contents

Class ConsensusTimeStampForExchangeRateConverter

Converts a ConsensusTimeStamp to and from a numeric JSON value of whole seconds. Specific to exchange-rate data, which expresses its expiration as a bare seconds number rather than the dotted seconds.nanos string used elsewhere.

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

Methods

| Edit this page View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type ConsensusTimeStamp.

Declaration
public override ConsensusTimeStamp 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
ConsensusTimeStamp

The converted value.

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

Write(Utf8JsonWriter, ConsensusTimeStamp, JsonSerializerOptions)

Writes a specified value as JSON.

Declaration
public override void Write(Utf8JsonWriter writer, ConsensusTimeStamp timeStamp, JsonSerializerOptions options)
Parameters
Type Name Description
Utf8JsonWriter writer

The writer to write to.

ConsensusTimeStamp timeStamp
JsonSerializerOptions options

An object that specifies serialization options to use.

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