Modern JSON-LD implementation in 2025: Toward cleaner and maintainable SEO

Meta tags, titles, sitemaps... In technical SEO, the basics are usually well covered. But when it comes to structured data, it’s a different story. Many web projects still integrate it hastily, often via copy-pasted code, poorly maintained, with no validation or structure.

JSON-LD illustration with @graph linking Article, Organization, and Breadcrumb for SEO

Yet JSON-LD structured data is now essential for content visibility in Google’s rich results. The key is implementing it properly.

In this article, we’ll explore a modern, maintainable, and typed approach to JSON-LD, ideal for JavaScript and TypeScript environments, so you can integrate structured data in a clean, robust way for the long haul.

What is JSON-LD and why should you care?

JSON-LD (JavaScript Object Notation for Linked Data) is the format recommended by Google for integrating structured data into a web page. It helps search engines understand page content by providing semantic context: is it an article? A recipe? A product page?

Unlike older formats (Microdata, RDFa), JSON-LD is separated from the HTML and typically embedded in a <script type="application/ld+json"> tag. That offers several advantages:

  • No interference with HTML structure
  • Easier to read and dynamically generate
  • More maintainable in JS/TS codebases

Common use cases:

  • ArticleNewsArticleBlogPosting: for editorial content;
  • ProductOfferReview: for e-commerce;
  • EventOrganizationBreadcrumbList, and more.

The goal isn’t just better SEO visibility, it’s also about preparing for a more semantic and interoperable web.

Common implementation pitfalls

Even in 2025, many JSON-LD implementations suffer from common issues that can limit indexing or eligibility for rich results.

  • Multiple scattered <script> tags: You’ll often see one schema per script, placed randomly in the DOM. This complicates reading, validation, and can cause conflicts.
  • Duplicated data: It’s still common to see the same schema repeated, sometimes with inconsistent values, which sends mixed signals to Google.
  • Incomplete or invalid structures: A NewsArticle without a headline, or an Organization with an invalid url, are frequent issues that reduce schema usefulness.
  • Syntax and typing issues: Basic JSON mistakes (missing commas, wrong keys like "context" instead of "@context") are common, especially in untyped setups.

schema-dts: Typing and autocompletion for reliable schemas

To make JSON-LD more robust and maintainable, Google developed schema-dts, a powerful TypeScript helper.
It’s a set of TypeScript types generated from Schema.org’s vocabulary. It offers:

  • Strong typing for your JSON-LD objects
  • IDE autocompletion (VS Code, WebStorm..)
  • Early error detection for required fields and structure
  • Valid and predictable output

Example :

import { NewsArticle } from "schema-dts";

const articleSchema: NewsArticle = {
  "@type": "NewsArticle",
  headline: "Implementing JSON-LD cleanly in 2025",
  datePublished: "2025-08-04T07:00:00.000Z",
  author: {
    "@type": "Person",
    name: "John Doe"
  }
};

With typing, if you omit required fields (headlinedatePublished, etc.), TypeScript will warn you, avoiding silent SEO failures.

Centralizing Schemas with @graph

One modern best practice is to centralize all structured data into a single script, using the @graph property. This:

  • Reduces DOM clutter
  • Simplifies validation (everything in one object)
  • Makes entity relationships clearer

Here’s a real-world example inside a <script type="application/ld+json">, fully centralized using @graph:

{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "name": "Example Blog",
      "url": "https://example.com",
      "logo": {
        "@type": "ImageObject",
        "url": "https://example.com/logo.png"
      }
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://example.com"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Blog",
          "item": "https://example.com/blog"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "JSON-LD Article"
        }
      ]
    },
    {
      "@type": "NewsArticle",
      "headline": "Modern JSON-LD Implementation in 2025",
      "datePublished": "2025-08-04T07:00:00.000Z",
      "author": {
        "@type": "Person",
        "name": "John Doe"
      },
      "publisher": {
        "@type": "Organization",
        "name": "Example Blog",
        "logo": {
          "@type": "ImageObject",
          "url": "https://example.com/logo.png"
        }
      },
      "mainEntityOfPage": "https://example.com/blog/json-ld-2025"
    }
  ]
}

Best Practices for 2025

  • Centralize your schemas: Use a single <script> with @graph. Avoid scattering multiple <script> tags across your DOM.
  • Always validate: Use tools like Google’s Rich Results Test or Schema.org validator to ensure eligibility and correctness.
  • Use typing + runtime validation: Leverage schema-dts or tools like zod to enforce both static and runtime validation of schema objects.
  • Avoid duplication: Each entity (e.g., Organization) should appear only once on a page, with consistent values across all schema objects.
  • Keep it readable and maintainable: Organize your schema logic in reusable files or utilities (e.g., lib/schema.ts), and document relationships clearly.
  • Don’t overload your pages: There’s no need to implement every available schema type. Focus on high-impact ones like ArticleProductBreadcrumbListFAQPage, etc.

Clean JSON-LD, Stronger SEO

JSON-LD isn’t just a technical checkbox for SEO. It’s a foundation for building a cleaner, more understandable, and future-proof web.Mettre en place des données structurées en JSON-LD, ce n'est pas juste cocher une case SEO. C'est structurer l'information pour un web plus compréhensible, maintenable et interopérable.

With a typed (schema-dts), centralized (@graph), and validated setup, you can shift from quick fixes to solid architecture. And as a bonus, your schemas will be easier to debug and scale over time.

Clean JSON-LD means clearer semantics, better indexing, and code that search engines, and developers, can trust.

  • SEO
  • Code Quality
  • Best practices
  • Web Development
Jerome Musialak

Jerome Musialak

CEO @ Enodo

A passionate developer since the age of 11, Jérôme cut his teeth at MinuteBuzz and then as CTO of MeltyGroup, where he managed the technical infrastructure of around thirty high-traffic sites including Virgin Radio, L'Étudiant, ... and the group's media. With this experience and aware of the recurring challenges faced by companies in creating and effectively distributing their content, he founded Enodo (from the Latin "to untie knots") with the mission of simplifying the digital ecosystem. An expert in performance optimization and high-availability architecture, he puts his obsession with technical details to the service of business challenges to build reliable systems that allow everyone to sleep soundly.

On the same subject