News for hackers. Stuff that matters.
Re:YAML: probably not so great after all (2017) by spankalee on Wednesday June 20, 2018 @08:16PM (#17361072)
JSON5 is also a great alternative: https://json5.org/

Supports comments, trailing commas, single quotes, multi-line strings, and more number formats.

Re:YAML: probably not so great after all (2017) by nojvek on Wednesday June 20, 2018 @10:52PM (#17361714)
I really wished json5 would support optional commas as well. If you have a new line, no comma needed. So you can do

[

1

2

3

]

New lines used by humans, computers should do a good job as well.

Re:YAML: probably not so great after all (2017) by adamkruszewski on Thursday June 21, 2018 @07:30AM (#17364049)
It looks very like an s-expression. Maybe we should go back to Lisp for our data encoding? (and to our code when we are at it? ;))
Re:YAML: probably not so great after all (2017) by Sean1708 on Thursday June 21, 2018 @09:09AM (#17364696)
Re:YAML: probably not so great after all (2017) by spiralx on Friday June 22, 2018 @12:43PM (#17375397)
Well you could use CSON, which uses CoffeeScript notation that allows for constructs such as:

required: [

  'firstName'

  'lastName'
]

which is the same as:

{

  "required": [

    "firstName",

    "lastName"

  ]
}

in JSON :)

Re:YAML: probably not so great after all (2017) by spankalee on Thursday June 21, 2018 @12:27AM (#17362166)
That's not a subset of JavaScript though.