<?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: Rohit Mittal</title>
    <description>The latest articles on DEV Community by Rohit Mittal (@rohit_mittal_3bf487001657).</description>
    <link>https://dev.to/rohit_mittal_3bf487001657</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%2F3928985%2Ffd5baeea-b44c-4ae1-a880-d847a80fa177.png</url>
      <title>DEV Community: Rohit Mittal</title>
      <link>https://dev.to/rohit_mittal_3bf487001657</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rohit_mittal_3bf487001657"/>
    <language>en</language>
    <item>
      <title>Catch LLM Schema Drift Before It Breaks Production</title>
      <dc:creator>Rohit Mittal</dc:creator>
      <pubDate>Mon, 22 Jun 2026 10:08:53 +0000</pubDate>
      <link>https://dev.to/rohit_mittal_3bf487001657/how-to-validate-ai-response-to-be-json-only-28ii</link>
      <guid>https://dev.to/rohit_mittal_3bf487001657/how-to-validate-ai-response-to-be-json-only-28ii</guid>
      <description>&lt;h2&gt;
  
  
  Your AI Returns a 200 OK. That Doesn't Mean It's Right.
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;A problem I kept hitting while building developer tools, and what I learned trying to solve it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A few months ago I started noticing something strange in a feature I'd built. The flow was simple: send some text to an LLM, ask for a structured JSON response, use that response in the app. It had been working fine for weeks. Then, with no code changes on my end, a field that used to always be a number started showing up as a string. Nothing crashed. No error in the logs. The API call returned 200 OK every single time. The response just quietly stopped looking the way my code expected it to.&lt;/p&gt;

&lt;p&gt;It took me longer than I'd like to admit to figure out what was happening, mostly because I was looking in the wrong place. I kept checking my own code, assuming I'd introduced a bug. I hadn't. The model's output had simply drifted.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this is different from a normal API breaking
&lt;/h3&gt;

&lt;p&gt;If you've worked with REST APIs for any length of time, you have a mental model for how things break. A provider deprecates a field, they put it in a changelog, you get a few months' notice, you migrate. Annoying, but predictable. There's a contract, and when the contract changes, there's usually a paper trail.&lt;/p&gt;

&lt;p&gt;LLMs don't work like that, and I don't think enough people building with them have fully internalized why.&lt;/p&gt;

&lt;p&gt;When you call an AI API and ask for JSON, you're not getting a structured response in the way a traditional API returns one. You're getting text that the model generated, which happens to look like JSON because you asked it to. There's no schema enforcement on the provider's end unless you've gone out of your way to add it yourself. The model is doing its best to satisfy your prompt, and "its best" can shift for reasons you have zero visibility into: a model version update, a subtle change in how it interprets ambiguous input, even just natural variance in generation.&lt;/p&gt;

&lt;p&gt;I'd ask the same prompt with the same model and get a slightly different shape back depending on the day. A field would get renamed. An array would occasionally come back as a single object when there was only one item, instead of a list with one item. A model would decide to wrap its JSON in a markdown code fence one time and not the next. None of this is the model being "wrong," exactly. It's just not playing the same enforcement role as a versioned API contract does.&lt;/p&gt;

&lt;h3&gt;
  
  
  The part that actually worried me
&lt;/h3&gt;

&lt;p&gt;Here's the thing that changed how seriously I took this. The scariest version of this problem isn't a prompt change you made yourself, because at least you'd remember making it and could investigate. The scariest version is when nothing on your end changed at all, and the output still drifted, because the model provider updated something behind the scenes.&lt;/p&gt;

&lt;p&gt;You ship a feature. It works. Weeks go by. You're not actively looking at it because it's "done." And then one day a field your downstream code depends on just isn't there in the format you expect, and you find out from a user, or from an error several layers removed from the actual cause, by which point you're debugging backwards trying to figure out when this started and why.&lt;/p&gt;

&lt;p&gt;For a feature you control end to end, that's a bad afternoon. For something with real consequences attached, the cost of that gap between "the output changed" and "I noticed the output changed" is the whole problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I ended up building
&lt;/h3&gt;

&lt;p&gt;The fix, once I framed it correctly, was a familiar pattern borrowed from a different problem. If you've ever set up monitoring for a third-party API you depend on, you already know the shape of this solution: define what a healthy response looks like, check periodically that reality still matches the definition, get told immediately when it doesn't.&lt;/p&gt;

&lt;p&gt;So that's what I built. You define a JSON Schema describing the shape your AI response should always have, you give it the actual prompt and provider you use in production, and it runs that prompt on a schedule, checking the real output against your schema. The moment something drifts, you get an alert, not a support ticket from a confused user three weeks later.&lt;/p&gt;

&lt;p&gt;I also added a version of this that runs synchronously inside a CI/CD pipeline, because there's a second failure mode worth catching separately: a developer (often me) tweaking a prompt to "sound more natural" and accidentally breaking the structure the application depends on. Scheduled monitoring catches drift you didn't cause. A CI check catches drift you're about to cause, before it ships.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I'd tell someone building with LLM APIs today
&lt;/h3&gt;

&lt;p&gt;If you're returning structured output from an AI model and feeding it directly into application logic, the single most useful thing you can do is stop assuming a 200 response means a correct response. Those are two different claims, and the gap between them is exactly where this kind of bug lives.&lt;/p&gt;

&lt;p&gt;You don't need anything elaborate to start. Even just logging the shape of what comes back and eyeballing it occasionally is better than nothing. But if the feature matters enough that a silent structural change would actually hurt — a customer-facing flow, anything billing-adjacent, anything where wrong data propagates somewhere consequential — it's worth treating the AI's output with the same seriousness you'd treat any other external dependency you don't fully control.&lt;/p&gt;

&lt;p&gt;I ended up building this into &lt;a href="https://fixzi.ai" rel="noopener noreferrer"&gt;Fixzi&lt;/a&gt;, the developer tools product I work on, because it was a problem I genuinely needed solved and couldn't find a simple version of anywhere else. If you're hitting the same thing, I'd be curious to hear how you're currently catching it — or if you're not catching it at all yet, which I suspect is more common than people want to admit.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>monitoring</category>
      <category>testing</category>
    </item>
    <item>
      <title>How to Detect API Breaking Changes Before They Break Your App</title>
      <dc:creator>Rohit Mittal</dc:creator>
      <pubDate>Mon, 01 Jun 2026 12:22:34 +0000</pubDate>
      <link>https://dev.to/rohit_mittal_3bf487001657/how-to-detect-api-breaking-changes-before-they-break-your-app-1hga</link>
      <guid>https://dev.to/rohit_mittal_3bf487001657/how-to-detect-api-breaking-changes-before-they-break-your-app-1hga</guid>
      <description>&lt;h2&gt;
  
  
  What Are API Breaking Changes?
&lt;/h2&gt;

&lt;p&gt;API breaking changes happen when an API response changes in a way that existing applications can no longer handle. These changes can silently break frontend apps, mobile apps, dashboards, and third-party integrations even if the API still returns a successful status code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Types of API Breaking Changes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Missing fields in the response&lt;/li&gt;
&lt;li&gt;Renamed keys (e.g. name → full_name)&lt;/li&gt;
&lt;li&gt;Changed data types (number → string)&lt;/li&gt;
&lt;li&gt;New nested structure&lt;/li&gt;
&lt;li&gt;Unexpected error response format&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Example of a Breaking Change
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt;&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;"user"&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="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;101&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;"Rohit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"plan"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pro"&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;&lt;strong&gt;After:&lt;/strong&gt;&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;"user"&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="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"101"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"full_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;"Rohit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"subscription"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"pro"&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;The API still works, but your app may break because keys and types changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Traditional Monitoring Fails
&lt;/h2&gt;

&lt;p&gt;Uptime monitoring only checks if an API endpoint is reachable. It does not verify whether the response is correct. This means your API can return HTTP 200 and still break your application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Validate API Response&lt;br&gt;
Always validate the API response structure before using it. Check for missing fields, invalid JSON, and incorrect types.&lt;/p&gt;

&lt;p&gt;Try: &lt;a href="https://fixzi.ai/api-response-validation" rel="noopener noreferrer"&gt;API Response Validation Tool&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Compare Old vs New Response&lt;br&gt;
Use a response diff tool to compare previous and current API responses. This helps identify structural changes instantly.&lt;/p&gt;

&lt;p&gt;Try: &lt;a href="https://fixzi.ai/api-response-validation" rel="noopener noreferrer"&gt;Compare API Responses&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Use &lt;a href="https://fixzi.ai/api-contract-monitoring" rel="noopener noreferrer"&gt;API Contract Monitoring&lt;/a&gt;&lt;br&gt;
The best way to detect breaking changes automatically is to define an expected response and monitor it over time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Save expected response&lt;/li&gt;
&lt;li&gt;Check API regularly&lt;/li&gt;
&lt;li&gt;Compare live vs expected&lt;/li&gt;
&lt;li&gt;Alert on mismatch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try: &lt;a href="https://fixzi.ai/api-contract-monitoring" rel="noopener noreferrer"&gt;API Contract Monitoring Tool&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Never assume API response is stable&lt;/li&gt;
&lt;li&gt;Validate responses before using them&lt;/li&gt;
&lt;li&gt;Use JSON diff for debugging&lt;/li&gt;
&lt;li&gt;Use schema validation for strict contracts&lt;/li&gt;
&lt;li&gt;Monitor APIs in production&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;API breaking changes are common and often silent. By combining validation, response diff, and contract monitoring, you can detect issues early and protect your application from unexpected failures.&lt;/p&gt;

</description>
      <category>api</category>
      <category>developers</category>
      <category>json</category>
      <category>xml</category>
    </item>
    <item>
      <title>Stop Writing JSON Schemas Manually — Generate Them Instantly from JSON</title>
      <dc:creator>Rohit Mittal</dc:creator>
      <pubDate>Tue, 19 May 2026 06:05:26 +0000</pubDate>
      <link>https://dev.to/rohit_mittal_3bf487001657/stop-writing-json-schemas-manually-generate-them-instantly-from-json-55j</link>
      <guid>https://dev.to/rohit_mittal_3bf487001657/stop-writing-json-schemas-manually-generate-them-instantly-from-json-55j</guid>
      <description>&lt;p&gt;Writing JSON schemas manually is one of those tasks developers hate but still have to do.&lt;/p&gt;

&lt;p&gt;You copy an API response, start defining types, add required fields, handle nested objects… and before you know it, you’ve spent 20–30 minutes on something that should have taken 2.&lt;/p&gt;

&lt;p&gt;What if you could generate a complete JSON schema instantly from your data?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problem with Manual JSON Schema Creation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s say you have this API response:&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;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;101&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"john@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;"is_active"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"created_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-01-01T12:00:00Z"&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;Now you need to write a schema like:&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;"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;"object"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"properties"&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="nl"&gt;"id"&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="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;"number"&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="nl"&gt;"email"&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="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;"string"&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="nl"&gt;"is_active"&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="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;"boolean"&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="nl"&gt;"created_at"&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="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;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"format"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"date-time"&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;span class="nl"&gt;"required"&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="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"is_active"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"created_at"&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;&lt;strong&gt;Not hard… but:&lt;/strong&gt;&lt;br&gt;
Time-consuming&lt;br&gt;
Error-prone&lt;br&gt;
Annoying for nested structures&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;💡 The Smarter Approach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of writing schemas manually, you can:&lt;/p&gt;

&lt;p&gt;👉 Paste your JSON&lt;br&gt;
👉 Generate schema automatically&lt;br&gt;
👉 Use it instantly for validation or documentation&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🛠️ Try It Yourself&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can generate JSON schema instantly using this tool:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://fixzi.ai/json-schema-generator" rel="noopener noreferrer"&gt;https://fixzi.ai/json-schema-generator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just paste your JSON and it will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Detect data types automatically&lt;/li&gt;
&lt;li&gt;Build a full schema structure&lt;/li&gt;
&lt;li&gt;Handle nested objects and arrays&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;🔍 What Makes This Useful?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Instant type detection&lt;/strong&gt;&lt;br&gt;
Numbers, strings, booleans — all inferred automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Works with nested JSON&lt;/strong&gt;&lt;br&gt;
Even deeply nested APIs can be converted in seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Saves development time&lt;/strong&gt;&lt;br&gt;
What used to take 20 minutes now takes 5 seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔗 Bonus: Validate Your Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you generate the schema, you can validate your JSON here:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://fixzi.ai/json-schema-validator" rel="noopener noreferrer"&gt;https://fixzi.ai/json-schema-validator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This helps ensure:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;API responses match expected structure&lt;/li&gt;
&lt;li&gt;No breaking changes go unnoticed&lt;/li&gt;
&lt;li&gt;⚠️ Common Mistake Developers Make&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Many developers:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Skip schema creation entirely&lt;br&gt;
Or write incomplete schemas&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This leads to:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Production bugs&lt;/li&gt;
&lt;li&gt;Broken API integrations&lt;/li&gt;
&lt;li&gt;Hard-to-debug issues&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;👉 Schema = contract&lt;br&gt;
And contracts should not be guessed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀 Pro Tip&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're working with APIs regularly:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate schema from response&lt;/li&gt;
&lt;li&gt;Save it&lt;/li&gt;
&lt;li&gt;Use it for validation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This creates a simple API contract system without heavy tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧩 Where This Fits in Your Workflow&lt;/strong&gt;&lt;br&gt;
Backend dev → validate responses&lt;br&gt;
Frontend dev → ensure data structure&lt;br&gt;
QA → test API consistency&lt;br&gt;
Automation → enforce contracts&lt;br&gt;
🎯 Final Thoughts&lt;/p&gt;

&lt;p&gt;JSON schema is powerful — but writing it manually is not.&lt;/p&gt;

&lt;p&gt;If you’re still doing it by hand, you’re wasting time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;👉 Generate it&lt;/li&gt;
&lt;li&gt;👉 Validate it&lt;/li&gt;
&lt;li&gt;👉 Move faster&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’ve been doing this manually till now, try automating it once — you won’t go back.&lt;/p&gt;

</description>
      <category>api</category>
      <category>automation</category>
      <category>productivity</category>
      <category>tooling</category>
    </item>
    <item>
      <title>5 Common JSON Errors That Break APIs (and How to Fix Them)</title>
      <dc:creator>Rohit Mittal</dc:creator>
      <pubDate>Wed, 13 May 2026 10:00:41 +0000</pubDate>
      <link>https://dev.to/rohit_mittal_3bf487001657/5-common-json-errors-that-break-apis-and-how-to-fix-them-dpi</link>
      <guid>https://dev.to/rohit_mittal_3bf487001657/5-common-json-errors-that-break-apis-and-how-to-fix-them-dpi</guid>
      <description>&lt;h2&gt;
  
  
  5 Common JSON Errors That Break APIs (and How to Fix Them)
&lt;/h2&gt;

&lt;p&gt;If you’ve worked with APIs for even a short time, you’ve probably run into this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Why is this JSON not working?!”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Everything looks fine… until your parser throws an error and your app breaks.&lt;/p&gt;

&lt;p&gt;The truth is, &lt;strong&gt;most JSON issues are small but deadly&lt;/strong&gt; — a missing comma, a trailing bracket, or an incorrect structure can completely break your API flow.&lt;/p&gt;

&lt;p&gt;In this post, I’ll walk through the &lt;strong&gt;5 most common JSON errors developers face&lt;/strong&gt;, along with simple fixes and examples.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Missing Commas Between Fields
&lt;/h2&gt;

&lt;p&gt;This is probably the most common issue.&lt;/p&gt;

&lt;p&gt;❌ Invalid JSON:&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;"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;"John"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&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;✅ Fixed JSON:&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;"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;"John"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&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;&lt;strong&gt;Why it happens:&lt;/strong&gt;&lt;br&gt;
When manually editing JSON, it’s easy to forget commas between key-value pairs.&lt;/p&gt;


&lt;h2&gt;
  
  
  2. Trailing Commas
&lt;/h2&gt;

&lt;p&gt;Some languages allow trailing commas — JSON does NOT.&lt;/p&gt;

&lt;p&gt;❌ Invalid JSON:&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;"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;"John"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&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;✅ Fixed JSON:&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;"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;"John"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&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;&lt;strong&gt;Tip:&lt;/strong&gt;&lt;br&gt;
If you're copying JSON from JavaScript objects, watch out for this.&lt;/p&gt;


&lt;h2&gt;
  
  
  3. Unquoted Keys or Strings
&lt;/h2&gt;

&lt;p&gt;JSON requires &lt;strong&gt;double quotes&lt;/strong&gt; for keys and string values.&lt;/p&gt;

&lt;p&gt;❌ Invalid JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Fixed JSON:&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;"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;"John"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&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;h2&gt;
  
  
  4. Incorrect Data Types
&lt;/h2&gt;

&lt;p&gt;Sometimes values are accidentally wrapped as strings instead of numbers or booleans.&lt;/p&gt;

&lt;p&gt;❌ Problematic JSON:&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;"isActive"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"true"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"10"&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;✅ Better JSON:&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;"isActive"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&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;&lt;strong&gt;Why it matters:&lt;/strong&gt;&lt;br&gt;
Your backend or frontend logic may behave incorrectly if types are wrong.&lt;/p&gt;


&lt;h2&gt;
  
  
  5. Unclosed Brackets or Braces
&lt;/h2&gt;

&lt;p&gt;This is another classic.&lt;/p&gt;

&lt;p&gt;❌ Invalid JSON:&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;"user"&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="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;"John"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Fixed JSON:&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;"user"&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="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;"John"&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;h2&gt;
  
  
  How to Fix JSON Faster
&lt;/h2&gt;

&lt;p&gt;Manually debugging JSON is frustrating — especially with large API responses.&lt;/p&gt;

&lt;p&gt;A better approach is to use a tool that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate JSON instantly&lt;/li&gt;
&lt;li&gt;Highlight errors&lt;/li&gt;
&lt;li&gt;Format and beautify the structure&lt;/li&gt;
&lt;li&gt;Fix common issues automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve been using a simple tool called &lt;strong&gt;Fixzi&lt;/strong&gt; for this:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://fixzi.ai/json-validator" rel="noopener noreferrer"&gt;https://fixzi.ai/json-validator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It helps quickly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate JSON&lt;/li&gt;
&lt;li&gt;Fix invalid structures&lt;/li&gt;
&lt;li&gt;Format and clean large payloads&lt;/li&gt;
&lt;li&gt;Compare JSON responses (useful for APIs)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;JSON errors are small, but they can cause &lt;strong&gt;big production issues&lt;/strong&gt; — especially when working with APIs, webhooks, or third-party integrations.&lt;/p&gt;

&lt;p&gt;If you’re debugging JSON frequently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always validate before using it&lt;/li&gt;
&lt;li&gt;Use proper formatting tools&lt;/li&gt;
&lt;li&gt;Avoid manual edits when possible&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you’ve faced other tricky JSON issues, I’d love to hear them 👇&lt;/p&gt;

</description>
      <category>api</category>
      <category>ai</category>
      <category>monitoring</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
