Re: YAML Was: CommitFest status/management

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: YAML Was: CommitFest status/management
Date: 2009-12-07 09:26:06
Message-ID: 87aaxvnnip.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Greg Smith <greg(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-12-07 10:21:16 Re: Clearing global statistics
Previous Message Heikki Linnakangas 2009-12-07 08:59:23 Re: Reading recovery.conf earlier