|
rapidyaml 0.15.2
parse and emit YAML, and do it fast
|
Example code for every feature. More...
Topics | |
| Overview | |
| Using csubstr | |
| Parsing | |
| Tree | |
| Serialization | |
| Emitting | |
| JSON | |
| YAML styles | |
| YAML anchors | |
| YAML tags | |
| YAML documents | |
| Errors and error handlers | |
| Allocators | |
| Static trees | |
| Sample helpers | |
| Helper utilities used in the quickstart. | |
Example code for every feature.
Best seen online at https://rapidyaml.readthedocs.io/v0.15.2/doxygen/
This file does a quick tour of ryml. It has multiple self-contained and well-commented samples that illustrate how to use ryml, and how it works.
Although this is not a unit test, the samples are written as a sequence of actions and predicate checks to better convey what is the expected result at any stage. And to ensure the code here is correct and up to date, it's also run as part of the CI tests.
If something is unclear, please open an issue or send a pull request at https://github.com/biojppm/rapidyaml . If you have an issue while using ryml, it is also encouraged to try to reproduce the issue here, or look first through the relevant section.
Happy ryml'ing!
This sample uses multiline C strings instead of C++11 R"(raw strings)" because the doxygen parser is badly broken when handling raw strings.
The directories that exist side-by-side with this file contain several examples on how to build this with cmake, such that you can hit the ground running. See the relevant section of the main README for an overview of the different choices. I suggest starting first with the add_subdirectory example, treating it just like any other self-contained cmake project.
Or very quickly, to build and run this sample on your PC, start by creating this CMakeLists.txt:
Now run the following commands in the same folder: