News for hackers. Stuff that matters.
Re:TOML: Tom's Obvious Minimal Language by josephg on Sunday May 21, 2023 @04:15PM (#36024324)
True. But the spec also doesn’t provide a way to tell if a stored number should be decoded as a float or an integer - which makes it a right pain to use correctly in most programming languages. I’d love it if json natively supported:

- Separate int / float types

- A binary blob type

- Dates

- Maps with non string keys.

Even javascript supports all this stuff now at a language level; it’s just JSON that hasn’t caught up.

Re:TOML: Tom's Obvious Minimal Language by bccdee on Sunday May 21, 2023 @04:50PM (#36024565)
Eh, I'm happy with json as being explicitly unicode. Blobs can be base64-encoded. And date parsing invites weird timezone stuff—I'm happy to stick dates in strings and let the programmer handle that. I suppose a good json parser could insist number literals are ints unless you append a ".0", obviating the need for explicit integers, but that feels a bit kludgey. And I agree about the numeric map keys.