Re: : in the flow context for PyYAML and SnakeYAML

William Spitzak <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
libyaml, which I thought was following the spec, quite specifically does 
not require a ':' in a "flow" context. There is code in there that 
literally says it is doing this, so somebody thought it was correct.

Here is a conversion using the event api of libyaml to read and write 
some 1-line files (the output has "flow" and all quoting forced on to 
make it understandable):

	a:1	-> "a:1"
	a: 1	-> {"a": "1"}
	{a:1}	-> {"a": "1"}
	{a: 1}	-> {"a": "1"}

So libyaml is doing what I think is being requested.

Kirill Simonov wrote:
> Hi Andrey,
> 
> On 08/18/2010 03:13 AM, Andrey Somov wrote:
>> Hi all,
>> according to http://pyyaml.org/wiki/YAMLColonInFlowContext colon in
>> the flow context does not work according to the 1.1 specification in
>> PyYAML.
>> PyYAML follows "pythonic" way instead of implementing language-neutral
>> solution. It causes compatibility issues with other languages.
>> There is an issue reported for SnakeYAML to address the problem -
>> http://code.google.com/p/snakeyaml/issues/detail?id=78
>>
>> The ticket for PyYAML is created but there is no progress -
>> http://pyyaml.org/ticket/158
>>
>> I am not really in favor to fix the problem only in SnakeYAML as we
>> find it important that any valid document for SnakeYAML is always
>> valid for PyYAML and vice versa.

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.