Show / Hide Table of Contents

Class UtcDateTimeConverter

Inheritance
object
JsonConverter
JsonConverter<DateTime>
UtcDateTimeConverter
Inherited Members
JsonConverter<DateTime>.CanConvert(Type)
JsonConverter<DateTime>.ReadAsPropertyName(ref Utf8JsonReader, Type, JsonSerializerOptions)
JsonConverter<DateTime>.WriteAsPropertyName(Utf8JsonWriter, DateTime, JsonSerializerOptions)
JsonConverter<DateTime>.HandleNull
JsonConverter<DateTime>.Type
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: CycloneDX.Spdx.Models.v2_3
Assembly: CycloneDX.Spdx.dll
Syntax
public class UtcDateTimeConverter : JsonConverter<DateTime>

Methods

| Edit this page View Source

Read(ref Utf8JsonReader, Type, JsonSerializerOptions)

Reads and converts the JSON to type DateTime.

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

The converted value.

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

Write(Utf8JsonWriter, DateTime, JsonSerializerOptions)

Writes a specified value as JSON.

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

The writer to write to.

DateTime value

The value to convert to JSON.

JsonSerializerOptions options

An object that specifies serialization options to use.

Overrides
JsonConverter<DateTime>.Write(Utf8JsonWriter, DateTime, JsonSerializerOptions)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX