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)
|
||
|---|---|---|
| .. | ||
| cmake | ||
| gtest-1.11.0 | ||
| integration | ||
| node | ||
| binary_test.cpp | ||
| BUILD.bazel | ||
| CMakeLists.txt | ||
| create-emitter-tests.py | ||
| handler_test.h | ||
| main.cpp | ||
| mock_event_handler.h | ||
| ostream_wrapper_test.cpp | ||
| parser_test.cpp | ||
| regex_test.cpp | ||
| specexamples.h | ||