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 at the same URL with .md appended. 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

JsonLdEntity Pennington.StructuredData

Base record for a schema.org JSON-LD entity. Subclass with JsonPropertyNameAttribute-decorated properties and override Type to declare a new schema.org type. Repeat the [JsonPropertyName("@type")] attribute on the override — Json does not inherit it from the abstract base.

Properties

Context string
JSON-LD context. Defaults to schema.org; override for a different vocabulary.
Type string
schema.org type literal (e.g. "Article", "Recipe").

Pennington.StructuredData.JsonLdEntity

namespace Pennington.StructuredData;

/// Base record for a schema.org JSON-LD entity. Subclass with JsonPropertyNameAttribute-decorated properties and override Type to declare a new schema.org type. Repeat the [JsonPropertyName("@type")] attribute on the override — Json does not inherit it from the abstract base.
public record JsonLdEntity
{
    /// JSON-LD context. Defaults to schema.org; override for a different vocabulary.
    
public string Context { get; set; }
/// schema.org type literal (e.g. "Article", "Recipe").
public string Type { get; }
}