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
Contextstring- JSON-LD context. Defaults to schema.org; override for a different vocabulary.
Typestring- 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; }
}