4 ms·
The other day I saw an auto-generated json file with comments and trailing commas and got really excited. A little digging showed that it was using JSON5. Pre
by dhbradshaw 6y ago
The other day I saw an auto-generated json file with comments and trailing commas and got really excited. A little digging showed that it was using JSON5. Pretty sweet!
https://json5.org/ https://json5.org/
- divbzero 6y agoCool! JSON5 looks intriguing. The core project implements a JavaScript module [1] but it looks like there are also experimental JSON5 libraries for Go [2], Python [3], Ruby [4], and Rust [5]. [1]: https://www.npmjs.com/package/json5 https://www.npmjs.com/package/json5 [2]: https://github.com/yosuke-furukawa/json5 https://github.com/yosuke-furukawa/json5 [3]: https://pypi.org/project/json5/ https://pypi.org/project/json5/ [4]: https://github.com/bartoszkopinski/json5 https://github.com/bartoszkopinski/json5 [5]: https://docs.rs/json5/ https://docs.rs/json5/ I noticed that JSON5 doesn’t include a Date type. There have been discussions about this in both the JavaScript [6] and spec [7] repos but with no resolution yet. [6]: https://github.com/json5/json5/issues/3 https://github.com/json5/json5/issues/3 [7]: https://github.com/json5/json5-spec/issues/4 https://github.com/json5/json5-spec/issues/4
- divbzero 6y agoWhat would really help JSON5 take off is if it gets bundled with browsers by default. For now it doesn’t seem all that appealing to add <script src="//unpkg.com/json5/dist/index.min.js"></script> to every HTML page as extra JavaScript instead of a native browser implementation.