Sub topic 10
Describing the Organization and News with JSON-LD
This chapter assumes you can write basic HTML, know what a press release is, and understand URLs and file hosting. You should also have read the chapters on semantic HTML and Open Graph metadata. JSON-LD builds on both. It describes the same facts in a form that software can read without guessing.
What JSON-LD is and why a newsroom uses it
JSON-LD (JSON for Linked Data) is a way to write structured facts as JSON inside a <script> tag. The vocabulary usually comes from schema.org, a shared dictionary of types such as Organization, NewsArticle, and ImageObject.
Semantic HTML tells a browser that a block is an article. JSON-LD tells a search engine which organization published it, when, and with which image. The page's visible text stays the same. The script block is read by crawlers and ignored by readers.
Three terms appear in every block:
@contextnames the vocabulary. For schema.org it ishttps://schema.org.@typenames the kind of thing being described.- Other keys are properties of that type, such as
headlineordatePublished.
Search engines use this data to understand your pages and sometimes to build richer results. Markup does not guarantee a rich result. It only makes your content eligible and unambiguous.
The release example
The topic's example describes one press release and its publisher:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "Acme launches Widget 2",
"datePublished": "2026-03-12T09:00:00Z",
"image": ["https://example.com/img/widget-2-1200x630.jpg"],
"publisher": {
"@type": "Organization",
"name": "Acme",
"url": "https://example.com",
"logo": "https://example.com/img/acme-logo.png"
}
}
</script>Key points about this block:
- The
type="application/ld+json"attribute stops the browser from running the content as JavaScript. It is data. datePublisheduses ISO 8601, the same format as thedatetimeattribute on the<time>element. A timezone designator such asZavoids ambiguity.imageis an array. You can list several crops, such as 16:9, 4:3, and 1:1. Use absolute URLs.publisheris a nested object with its own@type. Nesting is how JSON-LD expresses a relationship.
Matching the markup to the page
The most common error is markup that disagrees with the visible page. Search engine guidelines say structured data must describe content users can actually see. Keep these fields in step with the page:
| JSON-LD property | Must match |
|---|---|
| `headline` | The `<h1>` or `<h3>` link text of the release |
| `datePublished` | The `<time datetime>` value |
| `image` | The image used in `og:image` |
| `publisher.name` | The name in the footer and boilerplate |
| `mainEntityOfPage` | The canonical URL |
Generate the JSON-LD from the same data that renders the page. If the release lives in a content file with a title, date, and image, one template can emit the HTML, the Open Graph tags, the RSS item, and this block. Hand-editing each one invites drift.
Adding more properties
The minimal block works, but a newsroom release benefits from a few more fields. Here is a fuller version:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://example.com/newsroom/acme-launches-widget-2"
},
"headline": "Acme launches Widget 2",
"description": "Widget 2 cuts setup time for small teams.",
"datePublished": "2026-03-12T09:00:00Z",
"dateModified": "2026-03-12T09:00:00Z",
"image": ["https://example.com/img/widget-2-1200x630.jpg"],
"author": {
"@type": "Organization",
"name": "Acme",
"url": "https://example.com"
},
"publisher": {
"@type": "Organization",
"name": "Acme",
"url": "https://example.com",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/img/acme-logo.png",
"width": 600,
"height": 60
}
}
}
</script>What each addition does:
mainEntityOfPageties the article to its canonical URL. Use the same URL as yourrel="canonical"link.dateModifiedsignals a correction or update. Change it only when the content changes.authoris required by some consumers. For a company release, anOrganizationis acceptable. A namedPersonis also valid if a spokesperson is credited.logoas anImageObjectlets you state dimensions. Some validators prefer this to a bare URL string, though a bare URL is also valid in schema.org.
A press release published on your own site is not independent journalism. Some teams use Article or WebPage instead of NewsArticle for that reason. NewsArticle is acceptable for news posts and releases. Pick one type and apply it consistently across the newsroom.
Describing the organization once
Each release repeats the publisher. The organization itself deserves a fuller description on the newsroom index or home page. This is where your boilerplate facts become machine-readable.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://example.com/#organization",
"name": "Acme",
"url": "https://example.com",
"logo": "https://example.com/img/acme-logo.png",
"description": "Acme makes tools that help small teams set up and run projects quickly.",
"foundingDate": "2014",
"sameAs": [
"https://www.linkedin.com/company/example",
"https://www.youtube.com/@example"
],
"contactPoint": {
"@type": "ContactPoint",
"contactType": "media relations",
"email": "[email protected]"
}
}
</script>Notes on this block:
@idgives the organization a stable identifier. Other blocks can refer to it by that identifier instead of repeating every field.sameAslists official profiles elsewhere. It helps search engines connect your site to the same entity on other platforms. List only profiles you control.contactPointwithcontactTypemarks the press address as a media contact. Use the same address shown in the visible contact section.- Do not put personal phone numbers or addresses in markup unless they are already public on the page.
Referencing the organization from releases
With an @id defined, a release can point to it:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "Acme launches Widget 2",
"datePublished": "2026-03-12T09:00:00Z",
"image": ["https://example.com/img/widget-2-1200x630.jpg"],
"publisher": { "@id": "https://example.com/#organization" }
}
</script>This keeps one source of truth. A search engine that has seen both blocks can merge them. A crawler that sees only the release block gets just the reference, with no name or logo. If you rely on a particular consumer reading the publisher name from the release page alone, repeat the name and logo inline, as in the first example. Choose based on which consumers matter to you.
How the pieces fit together
The diagram shows how one content record feeds every output.
Common errors
These problems appear often in real newsrooms.
- Invalid JSON. A trailing comma, a missing quote, or a smart quote pasted from a word processor breaks the whole block. JSON does not allow comments either. The parser rejects the block silently, and no error appears on the page.
- Relative URLs. Values like
/img/logo.pngmay not resolve the way you expect. Use absolutehttps://URLs forimage,logo, andurl. - Dates without a timezone.
2026-03-12T09:00:00is read in an unspecified zone. AddZor an offset like+01:00. - Stale
dateModified. Setting it to the build time on every deploy tells crawlers the content changed when it did not. - Markup for hidden content. Describing a release that is not on the page violates search engine guidelines and can lead to manual actions.
- Duplicate conflicting blocks. Two
Organizationblocks with different names or logos confuse consumers. Define the organization once and reference it. - Wrong image size. A logo of 16 by 16 pixels or a social image far from 1200 by 630 may be rejected or cropped badly.
Validating the markup
Check structured data in two steps.
- Syntax. Paste the block into any JSON validator, or run it through a command-line parser. This catches commas and quotes.
- Vocabulary. Use the Schema Markup Validator at validator.schema.org to check types and property names against schema.org. Use Google's Rich Results Test to see whether a specific page is eligible for enhanced results.
You can also check syntax in a build step. This script extracts every JSON-LD block from an HTML file and fails if any cannot be parsed:
import json
import re
import sys
html = open(sys.argv[1], encoding="utf-8").read()
pattern = r'<script type="application/ld\+json">(.*?)</script>'
blocks = re.findall(pattern, html, flags=re.DOTALL)
if not blocks:
sys.exit("No JSON-LD blocks found")
for number, text in enumerate(blocks, start=1):
try:
data = json.loads(text)
except json.JSONDecodeError as error:
sys.exit(f"Block {number} is invalid: {error}")
print(f"Block {number}: {data.get('@type')} OK")Run it as python check_jsonld.py page.html. It checks only syntax. It does not know whether headline is a real schema.org property, so keep the vocabulary check as well.
Decision criteria
Not every field is worth maintaining. Use these questions to decide how much to add.
- Does a consumer use it? Fields no tool reads are cost without benefit. Start with the fields in the first example and add others when you have a reason.
- Can it be generated? Add a field if your template can fill it from existing data. Skip it if it needs manual upkeep.
- Will it stay true?
foundingDateandsameAsrarely change. Employee counts and revenue do, so leave them out of markup.
Exercise
A release page has <time datetime="2026-03-12">, but its JSON-LD says "datePublished": "2026-03-11T09:00:00". Name two problems and give a fix.
Show answer
The dates disagree, so the markup does not match the visible page. The JSON-LD value also has no timezone. Fix both by generating the HTML and the JSON-LD from one record, and write the value as 2026-03-12T09:00:00Z (or with an offset).
Exercise
You define an Organization block with "@id": "https://example.com/#organization" on the newsroom index. A release page contains only "publisher": { "@id": "https://example.com/#organization" }. What risk does this create, and when is it acceptable?
Show answer
A crawler that reads only the release page sees a reference with no name or logo, so it cannot show the publisher details. It is acceptable when the consumers you care about merge data across your pages. Otherwise repeat the name, URL, and logo inline in the release block.