Re: YAML Merge Keys status and implementation

Oren Ben-Kiki <[email protected]> Mon, 11 Jan 2016 10:03:13 +0200
Newsgroups gmane.text.yaml.general
Message-ID <CADJiDht1+Z5U9mg=W+1Q72RCaus2qDV-5RfZbaXoR0wd7qF=ng@mail.gmail.com>
On Mon, Jan 11, 2016 at 12:23 AM, Victor Efimov <[email protected]> wrote:

> Questions:
>
> 1) I understand that http://yaml.org/type/merge.html is optional, and
> a YAML parser is not obligated to support it.
> Is this correct?


Correct. It isn't even mentioned in the schemas listed inside the 1.2 spec.


> How many YAML implementations support it in the wild, in fact?
>

Good question. No idea...

2) In above example the following construct (not described in the draft)
>
> (form A)
> ===
>   fixture:
>      <<: *_m_text
>      <<: *_m_title
> ===
>
> is parsed by http://yaml-online-parser.appspot.com/. But should it be?
>

No. There is a duplicate key in the mapping.


> or more correct form would be (and it's described in the draft):
>
> (form B)
> ===
>   fixture:
>     <<: [ *_m_text, *_m_title ]
> ===
>
> Should/MAY/MUST/MAY-NOT YAML parser (which tends to support Merge
> Keys) support the first form (form A)?
>

Hmmm - something-NOT. Form A has duplicate keys.

Oren Ben-Kiki

------------------------------------------------------------------------------
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=267308311&iu=/4140

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