json-ld structured-data seo schema.org

JSON-LD Explained

JSON-LD (JSON for Linking Data) is a lightweight way to add structured data to your web pages. Let's explore why it matters and how it works.

What is JSON-LD?

JSON-LD is a format for encoding linked data using JSON. It's designed to be easy to read and write by humans and machines.

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "JSON-LD Explained",
  "author": {
    "@type": "Organization",
    "name": "Data Team"
  },
  "datePublished": "2025-10-30T00:00:00Z"
}

Why Use JSON-LD?

1. Better Search Results

Search engines use structured data to create rich snippets:

2. Semantic Web

Help machines understand your content's meaning, not just its presentation.

3. No Markup Pollution

Unlike microdata, JSON-LD lives in a <script> tag, keeping your HTML clean:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "My Article"
}
</script>

Common Schema.org Types

BlogPosting

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "My Blog Post",
  "author": {
    "@type": "Person",
    "name": "John Doe"
  },
  "datePublished": "2025-10-30",
  "image": "https://example.com/image.jpg"
}

Person

{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "Jane Smith",
  "jobTitle": "Software Engineer",
  "url": "https://janesmith.com",
  "sameAs": [
    "https://twitter.com/janesmith",
    "https://github.com/janesmith"
  ]
}

Organization

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Tens City",
  "url": "https://tens.city",
  "logo": "https://tens.city/logo.png"
}

Recipe (Bonus!)

{
  "@context": "https://schema.org",
  "@type": "Recipe",
  "name": "Chocolate Chip Cookies",
  "recipeIngredient": [
    "2 cups flour",
    "1 cup sugar",
    "1 cup chocolate chips"
  ],
  "recipeInstructions": "Mix and bake at 350°F for 12 minutes"
}

How Tens City Uses JSON-LD

Every blog post in Tens City automatically generates JSON-LD from its frontmatter:

Markdown Frontmatter:

---
title: My Post
author:
  name: John Doe
  type: Person
datePublished: 2025-11-03T00:00:00Z
tags:
  - example
---

Generated JSON-LD:

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "My Post",
  "author": {
    "@type": "Person",
    "name": "John Doe"
  },
  "datePublished": "2025-11-03T00:00:00Z",
  "keywords": ["example"]
}

Testing Your JSON-LD

Use these tools to validate your structured data:

  1. Google's Rich Results Test
  2. Schema.org Validator
  3. JSON-LD Playground

Best Practices

✅ Do

❌ Don't

The Future of Structured Data

JSON-LD is becoming the standard for structured data on the web:

Conclusion

JSON-LD is a simple, powerful way to make your content more discoverable and useful. Tens City automatically generates it for you, but understanding it helps you create better content.

Start thinking semantically, and the machines will thank you! 🤖