Class ConsensusTimeStampForTokenExpirationConverter
Converts a ConsensusTimeStamp to and from a numeric JSON value of nanoseconds since the epoch. Specific to the expiry timestamp returned in token info, which is reported in whole nanoseconds rather than the dotted seconds.nanos string used elsewhere.
Inheritance
ConsensusTimeStampForTokenExpirationConverter
Inherited Members
Namespace: Hiero.Converters
Assembly: Hiero.dll
Syntax
public sealed class ConsensusTimeStampForTokenExpirationConverter : JsonConverter<ConsensusTimeStamp>
Methods
| Edit this page View SourceRead(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
| Edit this page View SourceWrite(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. |