Hacker News new | ask | show | jobs
by bascule 3515 days ago
It would require the standard to be clear that the only way to indicate integers is via "i:288", though, or there will be ambiguity.

The spec does this here:

https://www.tjson.org/spec/#rfc.section.4.3

  4.3.  Floating Points

     All numeric literals which are not represented as tagged strings MUST
     be treated as floating points under TJSON.  This is already the
     default behavior of many JSON libraries.
If I'm switching parsers, the competition is no longer JSON, it's the full range of possible replacements, including Protocol Buffers, Cap'n Proto, XML, BSON, and everything else.

As noted in the post (which names a similar list of binary formats), TJSON is intended to be supplemental to binary formats, not a "replacement"

1 comments

Thank you. I skimmed over that accidentally. Good.