logoalt Hacker News

eknkc12/08/20243 repliesview on HN

I feel like the comments are the only important part. I’d rather not have single quoted strings or unquoted identifiers to be honest. Trailing commas are nice to have though.

All I miss in JSON are comments and a native datetime type. Everything else, I’m fine with.


Replies

sevensor12/08/2024

Strongly disagree about datetimes; they exist at a different semantic level and are entirely too easy to get wrong.

show 3 replies
BurningFrog12/08/2024

For comments, adding "_comment": "..." fields can work pretty well.

show 1 reply
dariusj1812/09/2024

IMO it would be great if fields could have annotations for types that fall back as strings. Datetimes could be annotated for easier parsing.