Add more examles, including using range-based for loops for iterating over `YAML::Node`s (link to my examples)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp, yaml
- Domain
- documentation
Research direction
Start with the README examples and the linked demo file, cpp/yaml-cpp_lib_demo.cpp. Review how the README links to examples and how the demo iterates over YAML sequences and maps; the issue proposes linking the demo and adding range-based loop examples. Done looks like the README points to the examples and readers can find sequence and map iteration guidance.
Written by the indexing model from the issue text.
Description
I really think you need some more examples, especially how to iterate over Sequences (lists) and Maps using range-based for loops.
I suggest you link to my examples here, in your readme: https://github.com/ElectricRCAircraftGuy/eRCaGuy_hello_world/blob/master/cpp/yaml-cpp_lib_demo.cpp
I'll add range-based for loop examples to my demo code above tonight, including like this, for example, to iterate over a Map:
YAML::Node data_phi = root_node["data"][6];
assert(data_phi.IsMap());
for (const std::pair<YAML::Node, YAML::Node>& keyValue : data_phi)
{
std::string key = keyValue.first.as<std::string>();
std::string value = keyValue.second.as<std::string>();
printf("key = %-15s value = %-15s\n", key.c_str(), value.c_str());
}
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 22h 2m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jbeder/yaml-cpp
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
-
Difficulty 3/5 Half a day Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
eclipse-score/lifecycle#929 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
colbymchenry/codegraph#3223 ·
Maintainers usually reply within 1 day