Re: The special keys (namely merging) in the spec

Oren Ben-Kiki <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <1244467655.4601.23.camel@nero>
On Sun, 2009-06-07 at 22:49 -0700, Joshua Choi wrote:
> I would like a small section in the spec devoted to special keys—in
> particular, the merge key.
> ...
> Now I ask: during Construction, how does the magic happen and the
> CENTER map gets merged? I see two things may happen:
> - The onus is on the constructor of the mapping object containing the
> merge key...
> - The onus is on the YAML loader...

There is a third option...
- The onus is on the constructor of the "merge" key.

The question is the API used to load the key/value pair, based on the
tags of the key and the value. Naively, it would return a single (key,
value) tuple. However, if it is allowed to return a list of (key, value)
pairs... Or simpler - allowed direct access to the mapping it is being
loaded to, and calls "add" or whatever any times it wants.

The same issue may be raised by other "magical" tags.

Have fun,

	Oren Ben-Kiki


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core
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.