JsonLdSerializer
Pennington.StructuredData
Serializes any JsonLdEntity subclass to a JSON string safe for embedding in a <script type="application/ld+json"> tag.
Methods
Serialize
#public static string Serialize(JsonLdEntity entity)
Serializes entity to JSON-LD. The concrete runtime type is used so subclass-only properties are included.
Parameters
entityJsonLdEntity
Returns
stringPennington.StructuredData.JsonLdSerializer
namespace Pennington.StructuredData;
/// Serializes any JsonLdEntity subclass to a JSON string safe for embedding in a <script type="application/ld+json"> tag.
public class JsonLdSerializer
{
/// Serializes entity to JSON-LD. The concrete runtime type is used so subclass-only properties are included.
public static string Serialize(JsonLdEntity entity)
;
}