Consider the following YAML:
trait1: &t1
foo: 1
trait2: &t2
foo: 2
merged:
<<: *t1
<<: *t2
yq reports:
$ yq .merged.foo < /tmp/yaml
2
while the order that yaml-cpp returns is different, since it will
firstly handle 1, and will not replace it with 2:
$ util/parse < /tmp/yaml
trait1:
? &1 foo
: &2 1
trait2:
foo: 2
merged:
*1 : *2
(Don't mix up "*2" with "2", it is trait1)
|
||
|---|---|---|
| .. | ||
| emitter_test.cpp | ||
| encoding_test.cpp | ||
| error_messages_test.cpp | ||
| gen_emitter_test.cpp | ||
| handler_spec_test.cpp | ||
| handler_test.cpp | ||
| load_node_test.cpp | ||
| node_spec_test.cpp | ||