Re: YAML Merge Keys status and implementation

Victor Efimov <[email protected]> Tue, 12 Jan 2016 11:37:12 +0300
Newsgroups gmane.text.yaml.general
Message-ID <CAF7QZD5jdOXA8bkcr8oiVc91GwQX=RCoW8UJ8Cak6KMRmrPOrg@mail.gmail.com>
Thank you!

2016-01-11 11:03 GMT+03:00 Oren Ben-Kiki <[email protected]>:
> 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