Live data from Hacker News

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

tson.io

11–20 of 68 posts

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

#11
post #10

Earlier quoted context omitted.

Here's some json: [] How do you add schema info to that?

Like this: { 'schema': 'c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2', 'data': [] }

And there you go, just `[]` is no longer valid, so you need a new format.

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

#13
you can just add schema to json why add new syntax now, especially for json I dont think it makes sense I honestly believe the war is over there won't be a xml to json moment unless we move to a new platform other than browsers which seem rather unlikely, json honestly is fine for something that's somewhat human readable...

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

#14
post #6

Seems like it draws a lot of inspiration from EDN. Tagged literals, commas-as-whitespace (and optional), and anything-can-be-a-key are features I sorely miss when I have to go back to JSON. Don't know how I feel about optional quotes around strings, that seems like a mistake. And having an immutable set literal would be nice as well.

Because I may not be the only one who was confused initially: I think EDN in this instance refers to the data serialization format (Extensible Data Notation) from the Clojure people, not to CBOR-EDN (Extended Diagnostic Notation), which also offers tagged literals and anything-can-be-a-key, IIRC.

Really unfortunate naming

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

#16
post #10

Earlier quoted context omitted.

Like this: { 'schema': 'c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2', 'data': [] }

And there you go, just `[]` is no longer valid, so you need a new format.

If you need a schema for [] you have lost the plot.

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

#17
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?

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

#19
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
Post reply on HN