Re: YAML Was: CommitFest status/management
Dimitri Fontaine <dfontaine@hi-media.com>
From: Dimitri Fontaine <dfontaine@hi-media.com>
To: Greg Smith <greg@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>, Josh Berkus <josh@agliodbs.com>, Tom Lane <tgl@sss.pgh.pa.us>, Ron Mayer <rm_pg@cheapcomplexdevices.com>, Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@postgresql.org
Date: 2009-12-07T09:26:06Z
Lists: pgsql-hackers
Hi, Greg Smith <greg@2ndquadrant.com> writes: > Robert Haas wrote: >> The main point here for me is that the JSON format is already >> parseable by YAML parsers, and can probably be turned into YAML using >> a very short Perl script - possibly even using a sed script. I think >> that it's overkill to support two formats that are that similar. >> > It's not the case that JSON can be turned into YAML or that it just happens > that it can be parsed by YAML parsers. While there was some possible > divergence in earlier versions, a JSON 1.2 document *is* in YAML format > already. JSON is actually a subset of YAML that uses one of the many > possible YAML styles--basically, YAML accepts anything in JSON format, along > with others. This means that by providing JSON output, we've *already* > provided YAML output, too. Just not the nice looking output people tend to > associate with YAML. Well we have JSON and agreed it was a good idea to have it. Now JSON is a subset of YAML and some would prefer another YAML style (me included). If the problem is supporting 2 formats in core rather than 3, what about replacing the current JSON support with the YAML one? At a later point we could even have JSON support back by having the YAML printer able to output different YAML styles, but I guess that's not where we are now. Vote: +1 for YAML even if that means dropping JSON. Regards, -- dim