Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It's because JSON doesn't have comments.

This is a big plus but JSON5 has pretty widespread language library support - probably equal to that of YAML tbh (e.g. Swift has native JSON5 support, I don't know that anyone natively supports YAML). Any reason not to opt for it here?



I believe JSON5 didn't exist when we first wrote pub. If it did, it certainly wasn't widely known.

Obviously, migrating to it now when there are thousands and thousands of packages and dozens of tools all reading pubspecs would be much more trouble than it's worth.


Understandable. I just checked & JSON5 was just 1 year later but even then it would've taken a lot longer to gain sufficient traction to be well supported.


Most protocols defined in RFCs require the use of regular JSON. You don’t have a choice.


Not sure what context you're referring to but we're discussing configuration file formats, not data transports, so I doubt that would be a frequent issue.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: