# TSON: A JSON superset with immutable, hash-pinned schemas

Original title: TSON – A JSON superset with immutable, hash-pinned schemas

> Hacker News story 49183069 · language: en · submitted 2026-08-05
> Web version: https://zeli.app/story/49183069
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 59 · by [andrewjneumann](<https://news.ycombinator.com/user?id=andrewjneumann>) · 💬 59
[original](<https://tson.io/>) · [HN discussion](<https://news.ycombinator.com/item?id=49183069>)

## Summary

TSON (Typed Schema Object Notation) is a schema system with immutable, hash-pinned schemas whose definitions are themselves data. A document names its schema, the schema names its meta-schema, and one hash verifies the whole chain. TSON's data format is a Unicode-first superset of JSON, making it enjoyable to write. Schemas are maps with a compact grammar, featuring records, enums, composition, refinement, subtraction, choice types, field groups, and templates. Versioning is simplified because schemas are immutable—a new version is just a new document with a new hash. TSON also enhances JSON with optional quotes, whitespace as separators, arbitrary-precision numbers, multi-line strings, real map keys, an absent sentinel, annotations, and type annotations. Currently a working draft, with a Java implementation available.

## Key quote

> A version is simply a new document with a new hash.

## HN discussion (59 comments)

### [kbolino](<https://news.ycombinator.com/item?id=49184297>)

> Using the query string to carry the sha256 hash but then saying the "hash parameter is verification metadata, not identity" doesn't make much sense. The ?query part of a URL is supposed to be sent to the server. If you want to add client-side (meta)data, you should use the #fragment part of a URL. See RFC 3986, sections 3.4 and 3.5: https://datatracker.ietf.org/doc/html/rfc3986#section-3.4

### [thyristan](<https://news.ycombinator.com/item?id=49185956>)

> Dislike.
>
> No comments means that one cannot use it for configuration. Properties repeat the XML mistake of the attribute/content dichotomy.
>
> And trailing commas as a syntax error prevents easy sorting/appending/editing of arrays.
>
> And it doesn't  fix a ton of JSON problems like strings containing newlines, quotes and the like, while introducing a ton of new problems, like the dependency on obscure Unicode features to elide quotes. This will lead to TSON homoglyph attacks.

### [Retr0id](<https://news.ycombinator.com/item?id=49184255>)

> What's the justification for being a superset of JSON? Being incompatible with most existing JSON tooling and interfaces is a big disadvantage, so there better be a tangible upside.
>
> Also, I see mention of hashing, but no mention of canonicalization. Does fiddling with a schema's whitespace change its hash?

### [gwbas1c](<https://news.ycombinator.com/item?id=49186935>)

> What problem is this trying to solve?
>
> \> Data with an immutable schema.
>
> \> TSON (Typed Schema Object Notation) is a schema system with immutable, hash-pinned schemas whose definitions are themselves data. A document names its schema, the schema names its meta-schema; one hash verifies the whole chain. The finishing touch, TSON's data format is a Unicode-first superset of JSON you'll actually enjoy writing.
>
> I'm not sure what problem this is solving?
>
> I rarely have issues with JSON schema validation; and when I do, the failure patterns aren't something that I want to offload to a 3rd party library.
>
> Basically, how my application fails with poorly formed JSON is part of how I define my application, which means that unexpected JSON needs to be handled on a case-by-case basis.
>
> \---
>
> Anyway, the system smells like xsd, which when I used it, wasn't worth the effort.

### [al_be_back](<https://news.ycombinator.com/item?id=49184862>)

> \>> Ordering, consensus, and mutability policy are application concerns outside this series. [1]
>
> Of course, immutable means as-is, but since you're not dealing with ordering etc (that's pretty big), I might as well use existing tech (JSON with a schema) and a policy (simple/naive: hash and compare lowercased data).
>
> [1] From their spec: 2.2.1 Identity and Content Addressing - https://tson.io/2026/32/tson-part1-data/#

---

## Cite

- Page: https://zeli.app/story/49183069
- Date: 2026-08-05
- Source: tson.io (https://tson.io/)
- Hacker News: https://news.ycombinator.com/item?id=49183069

## Other languages

- zh: https://zeli.app/zh/story/49183069 · markdown: https://zeli.app/zh/story/49183069.md
- ja: https://zeli.app/ja/story/49183069 · markdown: https://zeli.app/ja/story/49183069.md
- ko: https://zeli.app/ko/story/49183069 · markdown: https://zeli.app/ko/story/49183069.md
- de: https://zeli.app/de/story/49183069 · markdown: https://zeli.app/de/story/49183069.md
- es: https://zeli.app/es/story/49183069 · markdown: https://zeli.app/es/story/49183069.md
