This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

JsonLdDateConverter Pennington.StructuredData

Emits DateTime values in the JSON-LD wire format yyyy-MM-ddTHH:mm:ssZ regardless of Kind.

Methods

Read

#
public DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

Reads a JSON-LD date string back to a UTC DateTime.

Parameters

reader ref Utf8JsonReader
typeToConvert Type
options JsonSerializerOptions

Returns

DateTime

Write

#
public void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)

Writes a DateTime as yyyy-MM-ddTHH:mm:ssZ.

Parameters

writer Utf8JsonWriter
value DateTime
options JsonSerializerOptions

Pennington.StructuredData.JsonLdDateConverter

namespace Pennington.StructuredData;

/// Emits DateTime values in the JSON-LD wire format yyyy-MM-ddTHH:mm:ssZ regardless of Kind.
public class JsonLdDateConverter
{
    /// Reads a JSON-LD date string back to a UTC DateTime.
    
public DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
; /// Writes a DateTime as yyyy-MM-ddTHH:mm:ssZ.
public void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
; }