<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rahib Ali</title>
    <description>The latest articles on DEV Community by Rahib Ali (@rahibaly).</description>
    <link>https://dev.to/rahibaly</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4161638%2F48bc8b44-436e-4936-86c5-2a5781509765.png</url>
      <title>DEV Community: Rahib Ali</title>
      <link>https://dev.to/rahibaly</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rahibaly"/>
    <language>en</language>
    <item>
      <title>Stop Hand-Writing JSON-LD: Generate Valid Schema Markup in Seconds</title>
      <dc:creator>Rahib Ali</dc:creator>
      <pubDate>Sun, 04 Oct 2026 13:06:31 +0000</pubDate>
      <link>https://dev.to/rahibaly/stop-hand-writing-json-ld-generate-valid-schema-markup-in-seconds-4pe6</link>
      <guid>https://dev.to/rahibaly/stop-hand-writing-json-ld-generate-valid-schema-markup-in-seconds-4pe6</guid>
      <description>&lt;p&gt;If you've ever hand-written JSON-LD structured data, you know the drill: one missing comma, one wrong &lt;code&gt;@type&lt;/code&gt;, and Google silently ignores your rich results. I build SEO tools for a living, and I still don't write schema by hand anymore. Here's why — and the workflow I use instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why hand-written JSON-LD breaks
&lt;/h2&gt;

&lt;p&gt;JSON-LD looks simple until it isn't. The classic failure modes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Trailing commas&lt;/strong&gt; — valid in JS, fatal in JSON.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrong nesting&lt;/strong&gt; — &lt;code&gt;geo&lt;/code&gt; inside &lt;code&gt;location&lt;/code&gt; vs. parallel to it for LocalBusiness.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing required fields&lt;/strong&gt; — Google needs &lt;code&gt;headline&lt;/code&gt;, &lt;code&gt;author&lt;/code&gt;, &lt;code&gt;datePublished&lt;/code&gt;, and &lt;code&gt;image&lt;/code&gt; for Article. Miss one and you get no rich result, no error message, just silence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unescaped characters&lt;/strong&gt; — quotes inside descriptions breaking the whole block.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The 30-second workflow
&lt;/h2&gt;

&lt;p&gt;For standard schema types, a generator beats hand-writing every time. I built a &lt;a href="https://frostrank.com/tools/json-ld-schema-generator" rel="noopener noreferrer"&gt;free JSON-LD schema generator&lt;/a&gt; at FrostRank — no signup, runs entirely in your browser.&lt;/p&gt;

&lt;p&gt;Pick the type (Article, FAQPage, Product, LocalBusiness, Organization, BreadcrumbList, Person…), fill in the fields, copy the output. It comes wrapped in &lt;code&gt;&amp;lt;script type="application/ld+json"&amp;gt;&lt;/code&gt;, ready to paste into your page.&lt;/p&gt;

&lt;p&gt;Example output for an Organization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://schema.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Organization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Example Inc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"logo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://example.com/logo.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sameAs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"https://twitter.com/example"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"https://linkedin.com/company/example"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Drop it in your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"application/ld+json"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@context&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://schema.org&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Organization&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Example Inc&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Always validate before you ship
&lt;/h2&gt;

&lt;p&gt;Generated or not, validate everything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google's Rich Results Test&lt;/strong&gt; (&lt;a href="https://search.google.com/test/rich-results" rel="noopener noreferrer"&gt;https://search.google.com/test/rich-results&lt;/a&gt;) — paste the URL or code snippet; it flags errors and confirms rich-result eligibility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Schema Markup Validator&lt;/strong&gt; (&lt;a href="https://validator.schema.org/" rel="noopener noreferrer"&gt;https://validator.schema.org/&lt;/a&gt;) — checks your markup against the schema.org spec itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the Rich Results Test shows errors, fix the fields and regenerate — don't patch the JSON by hand and reintroduce the exact mistakes the generator saved you from.&lt;/p&gt;

&lt;h2&gt;
  
  
  When you SHOULD write it by hand
&lt;/h2&gt;

&lt;p&gt;Generators cover the standard types. Reach for hand-written JSON-LD when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You're combining multiple entities with &lt;code&gt;@graph&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You need dynamic schema injected at runtime (e.g., a product price pulled from your DB)&lt;/li&gt;
&lt;li&gt;You're doing something exotic, like &lt;code&gt;HowTo&lt;/code&gt; with video clips&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even then, generate the skeleton first and extend it. Starting from valid markup beats starting from a blank file.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Don't hand-write boilerplate schema — generate it.&lt;/li&gt;
&lt;li&gt;Validate with Google's Rich Results Test before deploying.&lt;/li&gt;
&lt;li&gt;Keep a generator bookmarked for the next time someone says "can you add FAQ schema to this page?"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Try the &lt;a href="https://frostrank.com/tools/json-ld-schema-generator" rel="noopener noreferrer"&gt;free JSON-LD schema generator&lt;/a&gt; — it's client-side, so nothing you paste ever leaves your tab. What's your schema workflow — generator, plugin, or hand-rolled?&lt;/p&gt;

</description>
      <category>seo</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
