, for the most part it's fine if I use a standard YAML format, but, I'd like to include defaults and aliases, but, whenever I load a "defaulted" block it's in a << hash first.
So why is this a problem? Why do you think so? What should happen instead?
I'd also ideally like to be able to override the defaults. If my block looks like this:
What do you mean by that exactly, can you give input/output?
Any tips gratefully received, the alias stuff comes from a ruby background
And is it something thats in the current yaml spec? I think this is your problem, I don't think '<<' : Merge keys from another mapping. is a generally available YAML feature
update: hah from 2009 A fix for merge keys in YAML::XS, YAML::Syck and the wikipedia reference is gone http://en.wikipedia.org/w/index.php?title=YAML&oldid=328219776#Data_merge_and_references so this isn't a widely supported feature
Yeah, YAML, its dumb :) Maybe when YAML tools improve ten fold, brave folks will look at YAML again, but most will still stick with JSON :)
In reply to Re: YAML Alias (xml)
by Anonymous Monk
in thread YAML Alias
by ianwinter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |