What Schema.NET does
Schema.NET generates C# POCO classes from the schema.org vocabulary so .NET code can build structured data without writing JSON by hand. Each class maps to a schema.org type such as WebSite or Organization, and properties are set as typed C# fields. Calling ToString() on an instance returns JSON-LD, and the same objects can be serialized to XML.
The output targets the head section of an HTML page, where a script element with type application/ld+json carries the structured data that search engines read. The readme warns that results written into a script element should use ToHtmlEscapedString() rather than ToString(), to avoid exposing the page to cross-site scripting. The repository also covers where schema.org is used, including Windows UWP app sharing, and ships a Schema.NET.Pending set for types schema.org still marks as pending.
Key features
- Strongly typed schema.org classes
- Schema.org types are exposed as C# POCO classes with typed properties instead of raw JSON strings.
- JSON-LD output
- Calling ToString() on an instance returns JSON-LD, as shown in the WebSite example.
- XML serialization
- All classes can be serialized into XML as well as JSON and JSON-LD.
- HTML escaping method
- ToHtmlEscapedString() escapes output before it is placed in a script element, avoiding cross-site scripting.
- Pending types namespace
- Schema.NET.Pending holds schema.org types that the vocabulary still marks as pending.
- Class and property model
- Follows schema.org's own definitions of classes and their properties for objects and services.
- Running code samples
- The readme points to more examples and actual running code samples beyond the basic WebSite snippet.
- MIT licensed source
- Repository is published under the MIT licence in C#, with contributions accepted via a contributing guide.
How it works
- Add the Schema.NET library to a C# project targeting .NET.
- Instantiate a class such as WebSite and assign its typed properties.
- Call ToString() to get JSON-LD, or serialize the object to XML.
- Use ToHtmlEscapedString() when the output goes into a script element.
- Place the resulting script tag in the head section of the HTML page.
Plans and pricing
The library is open source under the MIT licence, so there are no paid tiers listed.
Integrations and platforms
Works with
- .NET
- Google structured data
- Windows UWP
Repository facts
- RepositoryRehanSaeed/Schema.NET
- LanguageC#
- Stars691
- Forks87
- LicenceMIT
- Created2017-06-07
- Last commit2026-11-14
- Open issues67
- c-sharp
- covid-19
- dotnet
- dotnet-core
- google-structured-data
- json-ld
- poco
- schema
- schema-org
- structured-data
Services and details
Does SEO work itself
YesFree plan or free tools
YesAPI or MCP server
Yes
No information yet on keyword research, content optimization, writes content with AI, technical audits, rank tracking, backlinks and link building, local SEO, AI search visibility, free trial, WordPress plugin, browser extension, built for agencies. The website did not say; check with the vendor.
About the company
- Company RehanSaeed
- Website: github.com/RehanSaeed/Schema.NET
Listing compiled from public sources and the product's own website. Last updated 2026-11-12. Report a correction or request removal. Back to GitHub repos.