Re: : in the flow context for PyYAML and SnakeYAML
William Spitzak <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Kirill Simonov wrote:
>>> A lot? Other than Javascript eval(), I'm not aware of any parser library
>>> that could parse it. Python's standard json.py module certainly cannot
>>> do it. Could you name some of the parsers, please?
>> libyaml!
>
> And that's it? Hardly a lot.
Well the obvious thing is that javascript syntax does not require it.
A JSON derivative called Rison does not require it either and strips
quotes from keys on output. That was found 5 entries down on the first
page of a Google search. I'm sure there are more.
Also found a lot of bitching about parsers that require the quotes.
>> A quick check shows that libyaml already accepts [foo: bar] and
>> interprets it as [{"foo": "bar"}] so this problem already exists and my
>> change would do nothing to make this harder or easier.
>
> The problem is that according to your proposal, this should be
> interpreted as ["foo: bar"] instead.
I would certainly consider that a much better result than what YAML is
doing right now! Although throwing a parse error might be ok as well.
The current behavior is bizzare and certainly unexpected!
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d