Urgent.News

What's breaking now, across thousands of outlets.

Tech

Standard JSON Schema vs JSON Schema

Damn, I like standards! I'm so happy to live in a world where we can finally use USB-C for almost everything... Oh, the article is not about USB-C, but about JSON Schema finally getting a "Standard" in 2026! Well, I'm kidding here... JSON Schema is a standard itself, which has existed for a long time already- multiple standards, actually: first proposal 2007, draft-04, draft-07, draft-2020-12,…

Since its inception in 2007, JSON Schema has undergone numerous updates, including drafts-04, draft-07, draft-2020-12, and openapi-3.0. The core concept of JSON Schema revolves around describing JSON using JSON, as exemplified by the following example:

{

"type": "object",

"properties": {

"id": {

"type": "string"

},

"price": {

"type": "number"

}

},

"required": ["id", "price"]

}

JSON Schema plays a significant role in various widely-used tools and frameworks such as OpenAPI, OpenAI, OpenTelemetry, and OpenRPC. For instance, OpenAPI utilizes JSON Schema to outline HTTP APIs, while OpenAI employs it to ensure AI models generate structured output. OpenTelemetry leverages JSON Schema for configuration, and validation and hover support in IDEs are powered by JSON Schema as well.

However, the widespread adoption of JSON Schema has faced challenges due to the emergence of custom schema libraries. These libraries, like Joi, Valibot, and ArkType, offer distinct APIs, logic, types, and internal representations, which may not be compatible with JSON Schema. Consequently, developers have had to reinvent the wheel for each new library.

In an effort to address this issue, @colinhacks, @fabianhiller, and @ssalbdivad collaborated to create Standard Schema, which was later extended into Standard JSON Schema. This standard enables schema libraries to provide a uniform way of returning JSON Schema for consumption by other libraries. Essentially, Standard JSON Schema serves as a standard for passing JSON Schema around, thereby enhancing interoperability and reducing redundancy.

Although Standard JSON Schema adoption remains relatively low, several notable projects have embraced it. For example, the OpenAI SDK recently incorporated support for Standard JSON Schema, signaling a positive trend for the JavaScript ecosystem. Developers building libraries that necessitate types to be known at runtime are encouraged to explore the Standard JSON Schema documentation, as it can simplify the integration process.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Weekend Build Log: The Timeout Is the Product

You sit down Saturday with one failing test file. The stack trace is ugly and long. You want a tiny helper that groups those failures. Ninety minutes later you are still retrying a model.

  • Programmer groups failing test files together
  • Timeout set as product, limiting job to one verb
  • Sunday run with tight scope and 90-second limit

More from Sunday 13 September →