Blame | Last modification | View Log | Download
--- %YAML:1.0test: Simple In Place Substitutionbrief: >If you want to reuse an entire alias, only overwriting what is differentyou can use a << in place substitution. This is not part of the officialYAML spec, but a widely implemented extension. See the following URL fordetails: http://yaml.org/type/merge.htmlyaml: |foo: &fooa: Steveb: Clarkc: Briane: notnullbar:a: befored: othere: ~<<: *foob: newx: Orenc:foo: barbar: foobar_inline: {a: before, d: other, <<: *foo, b: new, x: Oren, c: { foo: bar, bar: foo}}foo2: &foo2a: Ballmerding: &dong [ fi, fei, fo, fam]check:<<:- *foo- *dongisit: testedhead:<<: [ *foo , *dong , *foo2 ]taz: &taza: Stevew:p: 1234nested:<<: *tazd: Dougw: &nestedrefp: 12345z:<<: *nestedrefhead_inline: &head_inline { <<: [ *foo , *dong , *foo2 ] }recursive_inline: { <<: *head_inline, c: { <<: *foo2 } }php: |array('foo' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull'),'bar' => array('a' => 'before', 'd' => 'other', 'e' => null, 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'x' => 'Oren'),'bar_inline' => array('a' => 'before', 'd' => 'other', 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'e' => 'notnull', 'x' => 'Oren'),'foo2' => array('a' => 'Ballmer'),'ding' => array('fi', 'fei', 'fo', 'fam'),'check' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam', 'isit' => 'tested'),'head' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'),'taz' => array('a' => 'Steve', 'w' => array('p' => 1234)),'nested' => array('a' => 'Steve', 'w' => array('p' => 12345), 'd' => 'Doug', 'z' => array('p' => 12345)),'head_inline' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'),'recursive_inline' => array('a' => 'Steve', 'b' => 'Clark', 'c' => array('a' => 'Ballmer'), 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'),)