YAML 2.0: drop arbitrary nodes to be used as keys
Andrey Somov <[email protected]> Wed, 2 Mar 2016 11:23:45 +0100
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <CALbkv0d6WgVsvSgE7sv3ZFQeC6ZQXsjZ1Rr+RMm6MA+yx1OpuQ@mail.gmail.com> |
Hi all, even though it looks like a powerful feature, it gives nothing. This should be removed: Note that YAML allows arbitrary nodes <http://www.yaml.org/spec/1.2/spec.html#node//> to be used as keys <http://www.yaml.org/spec/1.2/spec.html#key//>. In particular, a key <http://www.yaml.org/spec/1.2/spec.html#key//> may be a sequence <http://www.yaml.org/spec/1.2/spec.html#sequence//> or a mapping <http://www.yaml.org/spec/1.2/spec.html#mapping//>. Thus, without the above restrictions, practical one-pass parsing <http://www.yaml.org/spec/1.2/spec.html#parse//> would have been impossible to implement. The reason is not that it makes it impossible to convert YAML to JSON. The reason is that it must never be used. YAML should not advocate collections (often mutable data structures) as keys. Of course, the related restrictions, like "1024 rule" or "key is restricted to a single line", are also gone. The key must be a scalar. Point. Whatever it is. Cheers, Andrey ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Yaml-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/yaml-core