News for hackers. Stuff that matters.
Re:The rise and rise of JSON (2017) by ktpsns on Friday August 24, 2018 @08:26AM (#17834469)
One aspect about JSON is the lack of comments. This makes it mostly unsuitable as a configuration language and in fact simple "JSON for humans" such as https://hjson.org/ and https://json5.org/ exist. In my opinion, this is a design flaw and if JSON would be a bit more human-oriented, it could be much more widespread in non-web contexts.
Re:The rise and rise of JSON (2017) by rurban on Friday August 24, 2018 @09:39AM (#17834849)
It is not design flaw, it was a conscious decision to enhance security. JSON is still the only secure (and fast) generic transport protocol, all others but msgpack are insecure by design. The various attempts to "enhance" json with types, datetime, comments, ... just make it worse, don't fall into that trap.

The latest JSON changes also made it more insecure, while they didn't clarify the missing spec points, so even they fell into that trap. msgpack is more also a bit insecure than JSON, but not as dramatic as XML, YAML, BSON, ...

Re:The rise and rise of JSON (2017) by fenwick67 on Friday August 24, 2018 @08:52AM (#17834595)
I actually like that JSON has no comments.

With comments in a data transmission format you will end up with things like "conditional comments" in IE.

I agree there are certainly many better configuration languages.

Re:The rise and rise of JSON (2017) by ktpsns on Wednesday September 05, 2018 @01:31PM (#17920159)
I agree, but you can do context switchs also without having comments. For instance, the JSON Schema defines (Source: https://json-schema.org/latest/json-schema-core.html#rfc.sec...)

  {
     '$comment': "string that can hold whatever you want"
  }
and it is obvious that you can embed any other language in a string.