News for hackers. Stuff that matters.
Re:JSON5 is a proposed extension to JSON by coldtea on Sunday March 02, 2014 @07:57AM (#7328979)
>Are we seriously going to keep insisting on json as a configuration format?

Yes. It has good universal support, often without needing any libraries, it's simple, succint, and has good tooling.

>As Stormbrew already pointed out, we already have a format that is ideal for configurations (and sure, data exchange, why not), and it is called yaml.

Let's just not go there. YAML is a pain in the ass to parse, has different incompatible versions, the libraries are of widely varying quality, is not natively (without third party stuff) supported in most languages, and it's generally a mess.

Re:JSON5 is a proposed extension to JSON by clarkevans on Sunday March 02, 2014 @08:49AM (#7329128)
There are lots of problems with YAML; it does too much. If I had time, I'd definitely want to do a 2.0 that gives it a small haircut removing the most bothersome of problems. I've been unable find time for work required: about a year of discussing, writing, coding, testing, packaging, and forging consensus.

What I'd keep in YAML is the information model. When we started YAML ~12 years ago, it was obvious that configuration should be in XML, and that XML's information model was the correct way to organize data structures. Part of YAML's work was explaining a different way of doing things to those who'd otherwise use XML. This isn't a concern these days...

That said, the productions look painful because the specification doesn't separate the scanner from the parser. Once you do that, the syntax is quite a bit more sane to grok (see PyYAML source). It's not nearly as bad as what you may think... IF you see it this way.

Besides a few unfortunate syntax structures, YAML's complexity and sharp edges comes from it's venture into typed objects, type-spaces, and implicit typing. Much of this, for configuration files, is unnecessary.

When we wrote YAML, we only had a few years experience with it; and well, it wasn't done as a full time endeavour. It was a guess as to how things should work. It wasn't easy to bootstrap YAML. It's now ten years later... and, well, lots of people have experience with it. It's probably time for the haircut.

Re:JSON5 is a proposed extension to JSON by jrochkind1 on Sunday March 02, 2014 @11:30AM (#7329619)
oh, please do this.

I love yaml -- except on the rare by very painful occasions where I get hugely bitten by incredibly weird problems arising from unexpected interplay of yaml features.

Some of the originators of yaml are probably the only people who the social power to promulgate a revision with a haircut. That would be awesome.

Re:JSON5 is a proposed extension to JSON by lifeisstillgood on Sunday March 02, 2014 @12:12PM (#7329808)
So if there were people willing to take on the lions share of the years work of consensus forming, what would it take to get you on board to YAML-haircut? What forms of decision making would make it attractive to you?
Re:JSON5 is a proposed extension to JSON by clarkevans on Sunday March 02, 2014 @01:06PM (#7330022)
That's a great question; those who only participate at the periphery can hardly expect significant influence.
Re:JSON5 is a proposed extension to JSON by lifeisstillgood on Sunday March 02, 2014 @03:58PM (#7330727)
Perhaps a different question then - if such a group were to form whose consensus would they need to pull in, what rough roadmap would you suggest they follow. What, in short, is going to hurt and when should they duck?
Re:JSON5 is a proposed extension to JSON by coldtea on Sunday March 02, 2014 @01:32PM (#7330125)
Thanks for the response.

I like the promise of YAML, but having tried it a could of projects, found all these issues which prevent it to be a simple, turn-key solution that JSON can be (at least for simple needs).

How do you feel about TOML? I find it a sane compromise, at least for congiguration file needs.

Re:JSON5 is a proposed extension to JSON by clarkevans on Monday March 03, 2014 @11:24AM (#7334590)
YAML uses dash (-) and colon (:) and white-space for a reason, it's not a random selection of structural markers.
Re:JSON5 is a proposed extension to JSON by burntsushi on Sunday March 02, 2014 @11:16AM (#7329577)
How about TOML? There was an implementation for most languages under the sun within a week of its release.[1]

(Certainly I acknowledge that it is not as ubiquitous as JSON or YAML, but I do like TOML better than both of those for configuration.)

[1] - https://github.com/mojombo/toml#implementations