News for hackers. Stuff that matters.
Re:JSON5 – JSON for Humans by int_19h on Monday December 09, 2024 @12:13PM (#42368039)
What made JSON win was the ease of use from JS (= frontend).
Re:JSON5 – JSON for Humans by hn_throwaway_99 on Monday December 09, 2024 @02:10PM (#42369374)
100%

JSON wasn't some magical, made-on-the-fly format that makes Crockford some kind of genius. It was simply the standard Javascript object literal notation with some added constraints. I think some of those constraints make sense (i.e. are there any other languages that support both single and double quotes for string literals?), but funnily enough, some of the biggest issues with JSON interoperability is it is very underspecified in the areas that matter, such as the type and width of numeric literals, what to do in some edge cases like duplicate keys, etc. Just did a quick search, and here is a post that outlines some of the real security risks this underspecification leads to: https://bishopfox.com/blog/json-interoperability-vulnerabili...

Re:JSON5 – JSON for Humans by Aloisius on Monday December 09, 2024 @09:49PM (#42373207)
> are there any other languages that support both single and double quotes for string literals?

Yes, quite a few like Python, PHP, Fortran, COBOL, Lua, R, Ruby, Perl, Bourne Shell, Dart, Groovy, etc.

Though some only interpolate with one or the other.

Re:JSON5 – JSON for Humans by devjab on Monday December 09, 2024 @02:50PM (#42369818)
Back in the early 00’s json wasn’t winning because it was derived from JavaScript, it was winning because it was the “easiest to use” standard on web services.

Sure it’s derived from JavaScript and it plays a major part in frontend development today. It was really the other way around though, when Ajax picked up people started realising that they could use json to make frontends work with “just” html and JavaScript.