Home / Blog / JSON tools

JSON tools

JSON Schema and SEO: Distinguish Validation from JSON-LD

Separate JSON Schema validation from Schema.org JSON-LD, choose markup that matches visible content, and check search eligibility honestly.

Resolve the two meanings of schema first

JSON Schema and Schema.org structured data solve different problems. JSON Schema describes rules used to validate a JSON instance, such as requiring a string property or limiting a numeric quantity. Schema.org supplies a vocabulary for describing things such as articles, people and products. JSON-LD is one format used to express that linked data on a web page.

If your goal is to describe an article to search engines, a document full of JSON Schema keywords such as properties and required is not a substitute for the article's structured data. If your goal is to reject an invalid API request, adding an Article type and a headline does not perform request validation.

Recognize a validation contract

This small JSON Schema says that a JSON object must contain a nonempty headline string. It is useful as an internal check for an application's data, but it does not assert that a particular article exists.

{
  "type": "object",
  "properties": {"headline": {"type": "string", "minLength": 1}},
  "required": ["headline"]
}

The object {"headline":"A guide to local maps"} passes that rule. An empty object or an empty headline fails. None of those outcomes says whether the article is publicly accessible, whether the author identity is true or whether a search engine will show an enhanced result.

Recognize a description of an article

The following fictional JSON-LD object instead describes an article. It is an illustrative starting point, not a complete search-feature implementation. Replace example URLs and facts with the page's actual information before considering publication.

{
  "@context": "https://schema.org",
  "@type": "Article",
  "@id": "https://example.com/guides/local-maps/#article",
  "headline": "A guide to local maps",
  "url": "https://example.com/guides/local-maps/"
}

The Schema.org Article definition describes the vocabulary. Google's Article structured-data documentation explains the properties and behavior relevant to that search feature. Use the appropriate source for the question you are trying to answer instead of treating every vocabulary property as a search requirement.

Make the visible page the source of truth

Compare the markup with the page a reader sees. The headline should identify the article, the author should be the actual credited author, and an image URL should identify an appropriate accessible image. Do not fill in an invented review score, credential or publication date to make a validator display more fields.

Keep the first publication date when an article is revised. Update a modification date when the content actually changes and keep it consistent with the visible review information. A daily build should not automatically make an unchanged article look newly researched.

Check whether the CMS, theme or an SEO plugin already emits structured data. Adding a second block with contradictory names, dates or entity identifiers can create ambiguity. Coordinate the implementation around the actual entities rather than blindly adding another generator snippet.

Apply tests at the correct level

First parse the JSON to catch malformed quotes, commas and braces. Next check the vocabulary and entity relationships. Then use the search engine's feature-specific testing tool and current guidance for the feature you intend to support. Finally, inspect the deployed page to confirm the intended markup is present and reachable.

The general structured-data policies cover quality and eligibility considerations. Satisfying a test does not guarantee that an enhanced result will appear. Record a passing test as evidence about that test's scope, not as a ranking or traffic promise.

Use the generator as a starting point

The local JSON-LD Schema Generator for SEO creates a basic object for the selected type and supplied values. Review its fields against the actual page and add only applicable, supported information. It does not validate arbitrary JSON instances against a JSON Schema contract or certify Google eligibility.

For a template change, test more than one real page type in your own staging environment. An article, an organization page and a product listing have different meanings even when all three can contain a name, URL and description. Keep those differences explicit in the publishing model.