Structured data has evolved from a niche concept in semantic engineering to a fundamental pillar of modern technical search engine optimization (SEO) and artificial intelligence (AI) search engines. Among the standard serializations for Linked Data, JSON-LD (JavaScript Object Notation for Linked Data) stands as the absolute gold standard for communicating rich metadata to search engines like Google, Yahoo, and Bing. This comprehensive guide walks you through the complete evolution of structured data, starting with the core foundations of JSON-LD 1.0, advancing to the powerful enterprise features of JSON-LD 1.1, exploring the cutting-edge RDF-star proposals for JSON-LD 1.2 (JSON-LD-star), and finally examining the brand-new YAML-LD specification designed to make semantic syntax more readable than ever before.
Implementing fully-validated and error-free JSON-LD schema is one of the most effective ways to achieve rich snippets on Google Search, which dramatically boosts click-through rates. Additionally, publishing highly informative, structured technical content about specialized topics improves your site's E-E-A-T (Experience, Expertise, Authoritativeness, and Trustworthiness), paving a smoother path to Google AdSense program approval.
📖 Quick Navigation
- 1. JSON-LD 1.0 Foundations: Node & Vocabulary Keywords
- 2. Deep Dive: Enterprise Namespaces in @context
- 3. Deep Dive: Relative URI Resolution with @base and @id
- 4. JSON-LD 1.0: Value Objects, Text Keywords, & Collections
- 5. JSON-LD 1.1: Advanced Structure & Graph Layout Keywords
- 6. JSON-LD 1.1: Collections, Maps, and Advanced Container Directives
- 7. Practical Masterclass: Multi-Container Implementations & Schema-Compliant Mappings
- 8. JSON-LD 1.1: Enterprise Context Control & Protection
- 9. Deep Dive: Flipping Directions with @reverse
- 10. Deep Dive: Bundling Standalone Nodes with @included
- 11. Deep Dive: Local Lookup and UI Metadata with @index
- 12. Deep Dive: Simplifying Verbosity with @container
- 13. Deep Dive: Safeguarding Schemas with @protected and @propagate
- 14. JSON-LD 1.2 (JSON-LD-star) Draft: Annotating Arcs & Triple Reification
- 15. YAML-LD 1.0: Semantic Metadata with Elegant YAML Syntax
- 16. Keyword Comparison Reference Table
- 17. Summary & Best Practices
Step 1 JSON-LD 1.0 Foundations: Node & Vocabulary Keywords
The original JSON-LD 1.0 standard introduced a bridge between developer-friendly JSON format and the W3C's Resource Description Framework (RDF) model. By mapping traditional keys to internationalized web identifiers, it allowed systems to understand precisely what a term refers to, regardless of context. The core building blocks of any JSON-LD document are its node and vocabulary keywords.
The Role of @context
The @context keyword defines the mapping between simple local string keys (or terms) and full Internationalized Resource Identifiers (IRIs / URIs). It tells JSON-LD processors where to look to resolve property meanings.
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Alice"
}
Uniquely Identifying Nodes with @id
The @id keyword assigns a unique global identifier (IRI or URI) to a node object. This is equivalent to setting a primary key or a subject URI in RDF. It prevents the duplication of entity representations across different documents.
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://example.com/about#company",
"name": "Tech Corp"
}
Defining Node Classes with @type
The @type keyword defines the class or type of the object node, or explicitly sets the XML Schema datatype for typed literal values.
{
"@context": "https://schema.org",
"@type": "Book",
"datePublished": {
"@type": "http://www.w3.org/2001/XMLSchema#date",
"@value": "2026-01-15"
}
}
The Default Prefix with @vocab
The @vocab keyword defines a default base vocabulary URL for all terms declared inside the JSON document. This eliminates the need to map every individual key inside a custom @context block.
{
"@context": {
"@vocab": "https://schema.org/"
},
"@type": "Person",
"name": "Alice"
}
Step 2 Deep Dive: Enterprise Namespaces in @context
In massive corporate and semantic graph deployments, it is rare to rely on a single vocabulary like Schema.org. Enterprises connect a multitude of distinct taxonomies together—combining financial ontologies (FIBO), metadata cores (Dublin Core), social networks (FOAF), data catalogs (DCAT), and country representations (LCC). Instead of defining long-winded absolute URIs for every property, we establish a robust dictionary of short prefix namespaces directly inside the @context block.
Here is an enterprise-ready namespace mapping dictionary configured within JSON-LD. This allows developers to prefix any term with its namespace shorthand (e.g., dct:created, foaf:name, or fibo-fnd-org-org:Organization):
{
"@context": {
"bibo": "http://purl.org/ontology/bibo/",
"brick": "https://brickschema.org/schema/Brick#",
"cmns-cls": "https://www.omg.org/spec/Commons/Classifiers/",
"cmns-col": "https://www.omg.org/spec/Commons/Collections/",
"cmns-dt": "https://www.omg.org/spec/Commons/DatesAndTimes/",
"cmns-ge": "https://www.omg.org/spec/Commons/GeopoliticalEntities/",
"cmns-id": "https://www.omg.org/spec/Commons/Identifiers/",
"cmns-loc": "https://www.omg.org/spec/Commons/Locations/",
"cmns-q": "https://www.omg.org/spec/Commons/Quantities/",
"cmns-txt": "https://www.omg.org/spec/Commons/Text/",
"csvw": "http://www.w3.org/ns/csvw#",
"dc": "http://purl.org/dc/elements/1.1/",
"dcam": "http://purl.org/dc/dcam/",
"dcat": "http://www.w3.org/ns/dcat#",
"dct": "http://purl.org/dc/terms/",
"dctype": "http://purl.org/dc/dcmitype/",
"doap": "http://usefulinc.com/ns/doap#",
"eli": "http://data.europa.eu/eli/ontology#",
"fibo-be-corp-corp": "https://spec.edmcouncil.org/fibo/ontology/BE/Corporations/Corporations/",
"fibo-be-ge-ge": "https://spec.edmcouncil.org/fibo/ontology/BE/GovernmentEntities/GovernmentEntities/",
"fibo-be-le-cb": "https://spec.edmcouncil.org/fibo/ontology/BE/LegalEntities/CorporateBodies/",
"fibo-be-le-lp": "https://spec.edmcouncil.org/fibo/ontology/BE/LegalEntities/LegalPersons/",
"fibo-be-nfp-nfp": "https://spec.edmcouncil.org/fibo/ontology/BE/NotForProfitOrganizations/NotForProfitOrganizations/",
"fibo-be-oac-cctl": "https://spec.edmcouncil.org/fibo/ontology/BE/OwnershipAndControl/CorporateControl/",
"fibo-fbc-dae-dbt": "https://spec.edmcouncil.org/fibo/ontology/FBC/DebtAndEquities/Debt/",
"fibo-fbc-pas-fpas": "https://spec.edmcouncil.org/fibo/ontology/FBC/ProductsAndServices/FinancialProductsAndServices/",
"fibo-fnd-acc-cur": "https://spec.edmcouncil.org/fibo/ontology/FND/Accounting/CurrencyAmount/",
"fibo-fnd-agr-ctr": "https://spec.edmcouncil.org/fibo/ontology/FND/Agreements/Contracts/",
"fibo-fnd-arr-doc": "https://spec.edmcouncil.org/fibo/ontology/FND/Arrangements/Documents/",
"fibo-fnd-arr-lif": "https://spec.edmcouncil.org/fibo/ontology/FND/Arrangements/Lifecycles/",
"fibo-fnd-dt-oc": "https://spec.edmcouncil.org/fibo/ontology/FND/DatesAndTimes/Occurrences/",
"fibo-fnd-org-org": "https://spec.edmcouncil.org/fibo/ontology/FND/Organizations/Organizations/",
"fibo-fnd-pas-pas": "https://spec.edmcouncil.org/fibo/ontology/FND/ProductsAndServices/ProductsAndServices/",
"fibo-fnd-plc-adr": "https://spec.edmcouncil.org/fibo/ontology/FND/Places/Addresses/",
"fibo-fnd-plc-fac": "https://spec.edmcouncil.org/fibo/ontology/FND/Places/Facilities/",
"fibo-fnd-plc-loc": "https://spec.edmcouncil.org/fibo/ontology/FND/Places/Locations/",
"fibo-fnd-pty-pty": "https://spec.edmcouncil.org/fibo/ontology/FND/Parties/Parties/",
"fibo-fnd-rel-rel": "https://spec.edmcouncil.org/fibo/ontology/FND/Relations/Relations/",
"fibo-pay-ps-ps": "https://spec.edmcouncil.org/fibo/ontology/PAY/PaymentServices/PaymentServices/",
"foaf": "http://xmlns.com/foaf/0.1/",
"geo": "http://www.opengis.net/ont/geosparql#",
"gleif-L1": "https://www.gleif.org/ontology/L1/",
"gs1": "https://ref.gs1.org/voc/",
"hydra": "http://www.w3.org/ns/hydra/core#",
"lcc-3166-1": "https://www.omg.org/spec/LCC/Countries/ISO3166-1-CountryCodes/",
"lcc-4217": "https://www.omg.org/spec/LCC/Countries/ISO4217-CurrencyCodes/",
"lcc-cr": "https://www.omg.org/spec/LCC/Countries/CountryRepresentation/",
"lcc-lr": "https://www.omg.org/spec/LCC/Languages/LanguageRepresentation/",
"lrmoo": "http://iflastandards.info/ns/lrm/lrmoo/",
"mo": "http://purl.org/ontology/mo/",
"odrl": "http://www.w3.org/ns/odrl/2/",
"og": "http://ogp.me/ns#",
"org": "http://www.w3.org/ns/org#",
"owl": "http://www.w3.org/2002/07/owl#",
"prof": "http://www.w3.org/ns/dx/prof/",
"prov": "http://www.w3.org/ns/prov#",
"qb": "http://purl.org/linked-data/cube#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"sarif": "http://sarif.info/",
"schema": "https://schema.org/",
"sh": "http://www.w3.org/ns/shacl#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"snomed": "http://purl.bioontology.org/ontology/SNOMEDCT/",
"sosa": "http://www.w3.org/ns/sosa/",
"ssn": "http://www.w3.org/ns/ssn/",
"time": "http://www.w3.org/2006/time#",
"unece": "http://unece.org/vocab#",
"vann": "http://purl.org/vocab/vann/",
"vcard": "http://www.w3.org/2006/vcard/ns#",
"void": "http://rdfs.org/ns/void#",
"wgs": "https://www.w3.org/2003/01/geo/wgs84_pos#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "https://example.com/data/company-node",
"@type": "fibo-be-corp-corp:Corporation",
"dct:title": "Global Tech Entity",
"foaf:homepage": {
"@id": "https://example.com"
}
}
Using namespaces inside @context allows cross-organizational ontologies to coexist harmoniously in a single document. Instead of repeating https://spec.edmcouncil.org/fibo/ontology/BE/Corporations/Corporations/ for every class definition, semantic applications can use simple CURIEs (Compact URIs) like fibo-be-corp-corp:Corporation, significantly reducing overall bundle size.
Step 3 Deep Dive: Relative URI Resolution with @base and @id
One of the most powerful and misunderstood features in JSON-LD is the interaction between @base and @id. It provides syntactic compression for local entity paths.
How Relative URI Resolution Works
In standard web documents, relative links are resolved against the document's host URL. Inside a JSON-LD parser, the @base keyword sets a designated base URI explicitly for resolving all relative paths within the document—specifically targeting the values inside the @id keyword.
This means that if you have a base declared as https://example.com/products/, and a relative identifier declared as "widget-101", the parser automatically concatenates them to form an absolute semantic path: https://example.com/products/widget-101.
{
"@context": {
"@vocab": "https://schema.org/",
"@base": "https://example.com/products/"
},
"@type": "Product",
"@id": "widget-101",
"name": "Heavy Duty Widget",
"category": {
"@id": "industrial-tools"
}
}
In the above example, let's trace how the JSON-LD processor computes the identifiers:
- The entity class resolves to the absolute schema URL:
https://schema.org/Product(due to@vocab). - The main object
@idcomputes directly to:https://example.com/products/widget-101(due to@base+ relativewidget-101). - The sub-entity
category's@idcomputes directly to:https://example.com/products/industrial-tools(due to@base+ relativeindustrial-tools).
Using relative identifiers mapped to an explicit @base means your structured data documents are completely portable! If your domain changes from example.com to enterprise.com, you only need to change the single @base parameter in the context block, rather than refactoring thousands of individual absolute @id values scattered throughout your graph database.
Step 4 JSON-LD 1.0: Value Objects, Text Keywords, & Collections
When dealing with semantic data, simple string values are not always sufficient. Frequently, you need to append supplementary details, such as localized languages, specific datatypes, or strict ordering constraints.
Representing Raw Values with @value
The @value keyword specifies the raw literal payload inside a Value Object. This is utilized when you need to attach metadata (like a language code or datatype) to a primitive value rather than a complex object structure.
{
"@context": "https://schema.org",
"@type": "Article",
"headline": {
"@value": "Hello World",
"@language": "en"
}
}
Defining Languages with @language & @direction
The @language tag expects a standard BCP 47 language code (such as en, fr, or hi) to specify the human language of a string. JSON-LD 1.1 added @direction, allowing you to explicitly specify the written reading direction (ltr for Left-to-Right, or rtl for Right-to-Left) to handle diverse global scripts elegantly.
{
"@context": "https://schema.org",
"@type": "Article",
"description": {
"@value": "مرحبا بك",
"@language": "ar",
"@direction": "rtl"
}
}
Ordered Lists with @list vs. @set
By default, native JSON arrays are mapped to RDF as unordered sets. The @list keyword is required when the sequence or sequence order of elements is critical and must be strictly preserved. Conversely, @set guarantees that values are represented as an unordered mathematical set, preventing single scalar promotions during parsing cycles.
{
"@context": "https://schema.org",
"@type": "HowTo",
"steps": {
"@list": [
"Turn off water supply",
"Unscrew pipe fitting",
"Replace washer"
]
}
}
Step 5 JSON-LD 1.1: Advanced Structure & Graph Layout Keywords
While JSON-LD 1.0 excelled at simple hierarchical document mappings, developers ran into complex document structural limitations when managing non-linear object hierarchies, deep nested variables, and unlinked top-level nodes. JSON-LD 1.1 resolved these developer experience limitations by introducing dedicated graph layout keywords.
Un-nesting with @graph
The @graph keyword aggregates multiple sibling node objects in a flat, un-nested array wrapper under a single master payload context. This is incredibly useful for defining independent WebPage, Organization, and LocalBusiness nodes in a single file without nesting them awkwardly inside each other.
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Person",
"@id": "https://example.com/#alice",
"name": "Alice"
},
{
"@type": "Person",
"@id": "https://example.com/#bob",
"name": "Bob"
}
]
}
Inverse Relationships with @reverse
Sometimes relationships must point backwards in an object tree. Instead of redefining or hacking a parent model, the @reverse keyword exposes inverse links (e.g., describing a child's parent-link, or an employee's organization-link from inside the employee node).
Structuring Data without Creating Nodes using @nest
The @nest keyword allows you to group local properties together into nested visual sub-objects for better human readability, without creating a semantic intermediate node in the underlying RDF graph database model.
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Antinna Plumbing",
"@nest": {
"telephone": "+1-555-0199",
"email": "info@example.com"
}
}
Bundling Standalone Entities with @included
To include auxiliary top-level nodes in a payload without using @graph or establishing an artificial nested child link, @included lets you register orphan nodes under the context of an existing primary entity.
Step 6 JSON-LD 1.1: Collections, Maps, and Advanced Container Directives
Standard JSON-LD parsing treats custom dictionaries and multi-language structures in a highly verbose manner. JSON-LD 1.1 introduces powerful @container mappings to streamline syntactic developer workflow.
Understanding @container
The @container keyword is placed inside the @context of a property mapping definition to tell the processor how JSON structured formats (such as native maps, language keys, or index-keys) translate directly into semantic graph objects.
Available container configurations include:
@language: Automatically maps dictionary object keys directly to linguistic values.@index: Maps local object keys to indexed metadata without polluting the schema data.@id&@type: Map keys directly to identifiers or semantic classes respectively.@list&@set: Enforce arrays to treat values as strict lists or sets automatically.
{
"@context": {
"@vocab": "https://schema.org/",
"name": {
"@container": "@language"
}
},
"@type": "LocalBusiness",
"name": {
"en": "Antinna Plumbing",
"hi": "एंटिन्ना प्लंबिंग"
}
}
Step 7 Practical Masterclass: Multi-Container Implementations & Schema-Compliant Mappings
Let's look at an advanced, comprehensive, real-world example combining multiple modern JSON-LD 1.1 concepts into a single production schema. To ensure strict syntactic and semantic validity with Schema.org standards, we define the master entity as a Blog rather than a LocalBusiness. A Blog seamlessly supports properties like author, keywords, pages (as publication pages), and mainEntity (referencing articles). By adjusting this type, our schema passes strict RDF and Schema.org validation perfectly!
This code demonstrates complex multi-container arrays (like ["@set", "@language"]), multi-language value maps, custom type indexes, relational web pages, context scoping boundaries with @propagate, and secure integration patterns.
{
"@context": {
"@vocab": "https://schema.org/",
"name": {
"@container": "@language"
},
"author": {
"@container": "@type"
},
"pages": {
"@container": "@id"
},
"keywords": {
"@container": ["@set", "@language"]
}
},
"@type": "Blog",
"@id": "https://antinna.com/#business",
"name": {
"en": "Antinna Plumbing & Services Portal",
"hi": "एंटिन्ना प्लंबिंग एवं सर्विसेज पोर्टल",
"fr": "Antinna Plomberie et Services Portail"
},
"keywords": {
"en": ["plumbing", "pipe repair", "drain cleaning"],
"hi": ["प्लंबिंग", "पाइप मरम्मत", "नाली सफाई"],
"fr": ["plomberie", "réparation de tuyaux", "débouchage"]
},
"author": {
"Person": {
"@id": "https://antinna.com/#founder",
"name": {
"en": "Manish",
"hi": "मनीष",
"fr": "Manish"
}
}
},
"pages": {
"https://antinna.com/services": {
"name": {
"en": "Services & Booking",
"hi": "सेवाएं और बुकिंग",
"fr": "Services et Réservation"
}
},
"https://antinna.com/contact": {
"name": {
"en": "Contact Support",
"hi": "संपर्क सहायता",
"fr": "Support de Contact"
}
}
},
"mainEntity": {
"@context": {
"@propagate": false,
"title": "https://schema.org/headline"
},
"@type": "Article",
"title": "How to Fix Emergency Pipe Leaks",
"description": "Quick solutions for household plumbing issues before a plumber arrives."
}
}
Breaking Down the Advanced Mechanics & Schema Validity
This master block illustrates several crucial real-world technical implementations:
-
Schema.org Property-to-Type Rules: In Schema.org specifications, properties like
authororkeywordsare defined strictly forCreativeWorkand its subtypes (such asBlog,Article, orBook), but are invalid directly on aLocalBusiness. Correctly shifting the entity toBlogmakes our schema 100% compliant and semantic. -
Multi-Attribute Set Language Mappings: The
keywordsproperty defines"@container": ["@set", "@language"]. This enforces that the values are treated both as localized arrays mapped by BCP-47 language codes and as mathematically strict RDF sets. This prevents multi-item tags from collapsing or becoming unordered lists. -
Type-Scoping Node Containers: The
authormapping has"@container": "@type". This allows the JSON keys themselves (e.g."Person") to denote the semantic@typeof the inner block! -
Key-to-URI Mapping Containers: The
pagesmapping applies"@container": "@id". This maps the local keys directly to subject@ididentifiers (such ashttps://antinna.com/services), making custom portal indexes exceptionally clean. -
Security & System Integration: The unique identifier
"@id": "https://antinna.com/#founder"can double as an enterprise backend token or Firebase UID. By setting structural claims (such as administrative or owner tags) in your database matching this semantic ID, you can implement robust field-level validation where only authorized users or administrators can view private profile objects. -
Business-Owned Blogging Relationships: The outer entity represents a
Blogpublication portal which features and owns an emergency plumbing guide via themainEntityconnection. This models precise content authority, showing search engines that the article is backed by real-world subject matter experts (highly favored under Google E-E-A-T rules). -
Scoped Overrides via @propagate: Inside the
mainEntityblock, a specialized@contextredefines the keytitleto map directly tohttps://schema.org/headline. By declaring"@propagate": false, this rule is strictly locked to theArticlenode itself, preventing this override from leaking into any further child nodes.
Step 8 JSON-LD 1.1: Enterprise Context Control & Protection
In highly collaborative corporate environments, schemas and contexts are often managed by multi-disciplinary software teams or third-party SDK packages. In such scenarios, nested sub-objects run the dangerous risk of accidentally overriding root level context vocabulary. JSON-LD 1.1 added key context control features to defend against schema overrides.
External Modular Contexts with @import
The @import directive fetches an external context file and merges its property definitions directly into an inline @context block, simplifying schema reusability across platforms.
{
"@context": {
"@import": "https://example.com/contexts/custom-base.jsonld",
"specialField": "https://schema.org/identifier"
}
}
Locking Contexts with @protected
The @protected keyword acts as a const or final declaration for your defined schema terms. Once a term is defined as protected, any attempt to overwrite or re-map that term inside nested child scoped contexts will trigger a fatal JSON-LD parser failure.
Limiting Context Bleed with @propagate
By default, contexts declared inside specific embedded nodes (type-scoped contexts) bleed down automatically through all nested children. Setting "@propagate": false ensures context rules stay strict and isolated strictly to the immediate object scope where they are declared.
Step 9 Deep Dive: Flipping Directions with @reverse
RDF Knowledge graphs are strictly directional schemas built on the (Subject → Property → Object) model. For instance, in Schema.org, an Organization has an employee property which points to a Person. However, what if your local JSON payload is organized around a Person (e.g. Alice's bio profile), and you want to declare that Acme Corp employs her? Standard Schema.org doesn't officially define an inverse employer property on Person.
This is where @reverse works its magic. It tells graph processors that the relationship direction is reversed behind the scenes, allowing you to represent the exact semantic relation without violating schema definitions.
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Alice",
"@reverse": {
"employee": {
"@type": "Organization",
"name": "Acme Corp"
}
}
}
Behind the scenes, semantic processors record: [Acme Corp] → employee → [Alice], even though the visual root of your JSON document remains centered around Alice! This is incredibly clean and prevents data fragmentation.
Step 10 Deep Dive: Bundling Standalone Nodes with @included
Normally, including standalone nodes that aren't nested directly under a child property requires wrapping your whole payload inside a flat @graph array structure. If you want to keep your JSON organized around a primary object (such as an Article) but still package separate auxiliary nodes (like an independent Person author profile or Organization publisher), standard nesting breaks. The @included keyword allows you to seamlessly bundle secondary nodes inside your primary object's payload:
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Mastering JSON-LD",
"@included": [
{
"@type": "Person",
"@id": "https://example.com/authors/jane",
"name": "Jane Doe"
}
]
}
The JSON-LD processor parses this, extracts Jane Doe from the array, and lists her as a standalone, top-level node in the document graph alongside the article, rather than trying to force her to be an inline sub-attribute of the article node.
Step 11 Deep Dive: Local Lookup and UI Metadata with @index
Your local UI code or backend architecture frequently needs temporary identifier keys to manage application state (e.g., active tabs, sorting orders, or content draft versions). If you place these custom keys directly into semantic JSON-LD structures, search engine crawlers will get confused and report validation errors. The @index keyword solves this issue by attaching a local tracking key that graph processors store as metadata, but completely exclude from the parsed RDF triple graph.
{
"@context": "https://schema.org",
"@type": "Article",
"articleBody": {
"@value": "This is a draft preview...",
"@index": "draft-tab-v2"
}
}
Your local JavaScript code can query articleBody['@index'] to manage your frontend state machine, while Google's crawler evaluates the clean @value string and gracefully ignores the index metadata.
Step 12 Deep Dive: Simplifying Verbosity with @container
Let's look at how verbose multi-language structures look in standard JSON-LD 1.0:
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": [
{
"@language": "en",
"@value": "Antinna Plumbing"
},
{
"@language": "hi",
"@value": "एंटिन्ना प्लंबिंग"
}
]
}
By declaring "@container": "@language" inside your @context block, you unlock a highly compact and developer-friendly JSON representation:
{
"@context": {
"@vocab": "https://schema.org/",
"name": {
"@container": "@language"
}
},
"@type": "LocalBusiness",
"name": {
"en": "Antinna Plumbing",
"hi": "एंटिन्ना प्लंबिंग"
}
}
Step 13 Deep Dive: Safeguarding Schemas with @protected and @propagate
Let's look at how @protected stops third-party libraries or internal nesting layers from accidentally remapping important ID structures:
{
"@context": {
"@vocab": "https://schema.org/",
"id": {
"@id": "https://schema.org/identifier",
"@protected": true
}
},
"@type": "Product",
"id": "SKU-12345",
"review": {
"@context": {
"id": "http://purl.org/dc/terms/identifier"
}
}
}
The nested review block attempts to redefine the term id. Because the root context has declared id as @protected: true, the JSON-LD 1.1 parser will instantly halt and throw a fatal compilation error, protecting your master data schema from corruption.
Similarly, the @propagate keyword regulates context bleeding. Setting "@propagate": false confines your specialized mappings to the scope of the node in which they are defined, preventing leakage into further child nodes.
Step 14 JSON-LD 1.2 (JSON-LD-star) Draft: Annotating Arcs & Triple Reification
The next major leap in Linked Data semantics comes from the W3C's JSON-LD-star (JSON-LD-star/RDF-star) draft proposal. Historically, in semantic graphs, properties link a subject to an object. But what if you want to annotate the property link itself? For instance, how do you express that "Bob knows Alice" is only 80% certain, or was reported by Alice herself?
JSON-LD-star addresses this challenge by introducing three experimental keywords: @annotation, @reifies, and @triple. These allow developers to annotate semantic relationships directly.
Annotating Relations with @annotation
Using @annotation, we can attach attributes directly to property paths. Let's see how we can state that Bob knows Alice with a custom level of certainty:
{
"@context": {
"@vocab": "http://example.org/",
"knows": {
"@id": "http://example.org/knows",
"@type": "@id"
}
},
"@id": "bob",
"knows": {
"@id": "alice",
"@annotation": {
"accordingTo": "alice",
"certainty": 0.8
}
}
}
Annotating Multiple Triples with @reifies
When you want to describe one or more triples collectively, the @reifies keyword can bundle the target triple metadata under a single identifier node:
{
"@context": {
"@vocab": "http://example.org/",
"age": {
"@id": "http://example.org/age",
"@type": "http://www.w3.org/2001/XMLSchema#integer"
}
},
"@id": "reifier-node",
"@reifies": {
"@id": "bob",
"age": 42
},
"certainty": 0.8
}
Step 15 YAML-LD 1.0: Semantic Metadata with Elegant YAML Syntax
While JSON is incredibly popular, many developers find its syntax verbose, prone to trailing comma syntax errors, and lacking built-in support for code comments. To address these developers, the W3C published the YAML-LD 1.0 Working Draft.
YAML-LD maps YAML syntax concepts directly onto the JSON-LD standard. Since YAML is a natural superset of JSON, any valid JSON-LD file is technically valid YAML-LD. However, YAML-LD allows you to use clean indentation, write inline comments to explain your schema structure, and omit messy curly braces and quotation marks entirely!
# Elegant YAML-LD 1.0 representation
"@context": "https://schema.org"
"@type": "LocalBusiness"
"name": "Antinna Plumbing"
"telephone": "+1-555-0199"
# Inline metadata comments are fully supported!
"address":
"@type": "PostalAddress"
"streetAddress": "123 Semantic Way"
"addressLocality": "San Francisco"
"addressRegion": "CA"
During deployment, compilers expand this YAML-LD block into standard JSON-LD, giving you the best of both worlds: high-speed, readable developer formatting and complete compatibility with existing search engine parsers.
Step 16 Keyword Comparison Reference Table
To help you quickly identify when and where to use these key structured data components, we've compiled a comprehensive compatibility and usage reference table:
| Keyword | Introduced In | Primary Purpose | Mental Model / Analogy |
|---|---|---|---|
@context |
JSON-LD 1.0 | Defines key mappings to full IRIs | The bilingual translation dictionary |
@id |
JSON-LD 1.0 | Assigns a unique identifier to a node | The database Primary Key |
@type |
JSON-LD 1.0 | Defines class or literal datatype | The OOP Class designation |
@vocab |
JSON-LD 1.0 | Sets default namespace base URL | The global namespace declaration |
@base |
JSON-LD 1.0 | Resolves relative IRIs inside @id | Root context directory resolver |
@reverse |
JSON-LD 1.1 | Expresses inverse relationship links | "Subject owns me" instead of "I own Subject" |
@included |
JSON-LD 1.1 | Bundles auxiliary top-level nodes | The unlinked sidecar payload |
@index |
JSON-LD 1.1 | Attaches local non-semantic string keys | Sticky notes for frontend JS logic |
@protected |
JSON-LD 1.1 | Prevents redefinition of context terms | The const or final read-only variable |
@propagate |
JSON-LD 1.1 | Confines type-scoped contexts | Local scoping variables |
@annotation |
JSON-LD 1.2 (Draft) | Annotates properties and arcs directly | Metadata stamped directly on a connection line |
@reifies |
JSON-LD 1.2 (Draft) | Reifies and annotates multiple triples | Grouped semantic assertions |
Step 17 Summary & Best Practices
To ensure your structured data maps parse seamlessly for both SEO crawlers and semantic graph engines, adhere strictly to these proven production guidelines:
- Keep Contexts Clean: Declare your primary vocabularies at the root level using
@vocaband restrict scoping overrides to keep data clean and readable. - Protect Essential Schema Terms: In enterprise configurations or modular libraries, secure your primary identifiers with
@protected: trueto block silent overwrites. - Always Validate: Run your finished JSON-LD outputs through the official Schema.org validator and Google's Rich Results Test tool before deploying to production.
- Embrace New Standards: When designing internal analytics pipelines or handling rich entity annotations, evaluate JSON-LD-star and YAML-LD to simplify your codebase.
By leveraging these advanced JSON-LD capabilities, you will build data-rich web architectures that are perfectly optimized for search engines, LLMs, and semantic graph processors alike.
👉 Looking for the latest editor? This online editor currently supports JSON-LD 1.0 only. Try it here: JSON-LD Visual Editor (v1.0)
📄 License & Contributions
This technical guide is published under the open-source MIT License. Have questions about implementing advanced schema on your platform? Feel free to leave a comment or share your experience below!

Comments
Post a Comment