Colon In Flow Context

Andrey Somov <[email protected]> Mon, 25 Dec 2017 23:27:03 +0100
Newsgroups gmane.text.yaml.general
Message-ID <CALbkv0fuqEYaoiE1eM91-_PY9Ngnqhfkfgt-htYuiNQepJ8PnQ@mail.gmail.com>
--===============3283048151551117027==
Content-Type: multipart/alternative; boundary="001a1143a83e6e307b056131aa71"

--001a1143a83e6e307b056131aa71
Content-Type: text/plain; charset="UTF-8"

Hi all,
there is work progress to "fix" colon in the flow context (libyaml, PyYAML,
SnakeYAML).
What happens in PyYAML is the code which was preventing to use the colon is
removed.
The consequences:
1. The example 8.13 Completely Empty Flow Nodes (
http://yaml.org/spec/1.1/current.html#id902919) becomes broken. The ':'
becomes added to the "foo" key.
2. Counter intuitive YAML documents will bring a lot of complains and
misunderstanding

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

I see 3 possible ways to continue:
1. Revert it to how it was (the 1.1 spec is inconsistent and there was a
good reason for Kirill to prohibit colon)
2. Allow colon but fix the 1.1 and 1.2 specs, add tests, communicate the
change
3. Address the issue in future 1.3 and let the current implementation stay

My personal preference is either 1 or 3.

Cheers,
Andrey
(SnakeYAML developer)

--001a1143a83e6e307b056131aa71
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi all,<div>there is work progress to &quot;fix&quot; colo=
n in the flow context (libyaml, PyYAML, SnakeYAML).</div><div>What happens =
in PyYAML is the code which was preventing to use the colon is removed.</di=
v><div>The consequences:</div><div>1. The example<span style=3D"color:rgb(0=
,0,0);font-family:Menlo;font-size:9pt">=C2=A0</span><span style=3D"font-fam=
ily:Menlo;font-size:9pt;color:rgb(0,0,255)">8.13</span><span style=3D"color=
:rgb(0,0,0);font-family:Menlo;font-size:9pt">=C2=A0Completely Empty Flow No=
des</span>=C2=A0(<a href=3D"http://yaml.org/spec/1.1/current.html#id902919"=
>http://yaml.org/spec/1.1/current.html#id902919</a>) becomes broken. The &#=
39;:&#39; becomes added to the &quot;foo&quot; key.</div><div>2. Counter in=
tuitive YAML documents will bring a lot of complains and misunderstanding</=
div><div><br></div><div>{a:1} is &quot;a:1&quot; -&gt; null</div><div>{a:} =
is &quot;a:&quot; -&gt; null</div><div>{a :} is &quot;a :&quot; -&gt; null<=
/div><div><br></div><div>I see 3 possible ways to continue:</div><div>1. Re=
vert it to how it was (the 1.1 spec is inconsistent and there was a good re=
ason for Kirill to prohibit colon)</div><div>2. Allow colon but fix the 1.1=
 and 1.2 specs, add tests, communicate the change</div><div>3. Address the =
issue in future 1.3 and let the current implementation stay</div><div><br><=
/div><div>My personal preference is either 1 or 3.=C2=A0</div><div><br></di=
v><div>Cheers,</div><div>Andrey=C2=A0</div><div>(SnakeYAML developer)</div>=
</div>

--001a1143a83e6e307b056131aa71--


--===============3283048151551117027==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============3283048151551117027==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core

--===============3283048151551117027==--