{"id":33003041,"url":"https://github.com/jimmiebergmann/mini-yaml","last_synced_at":"2025-11-18T08:03:20.924Z","repository":{"id":48851210,"uuid":"118354177","full_name":"jimmiebergmann/mini-yaml","owner":"jimmiebergmann","description":"Single header YAML 1.0 C++11 serializer/deserializer.","archived":false,"fork":false,"pushed_at":"2023-04-16T13:23:57.000Z","size":917,"stargazers_count":204,"open_issues_count":13,"forks_count":38,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-02T16:09:10.112Z","etag":null,"topics":["cpp","deserialize","mini-yaml","parser","parsing","serialization","serializer","yaml"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimmiebergmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-21T16:52:28.000Z","updated_at":"2024-04-21T05:58:32.000Z","dependencies_parsed_at":"2024-01-03T01:20:00.241Z","dependency_job_id":"773e7869-a5a1-475d-8c4f-f4e0aa0839c3","html_url":"https://github.com/jimmiebergmann/mini-yaml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jimmiebergmann/mini-yaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmiebergmann%2Fmini-yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmiebergmann%2Fmini-yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmiebergmann%2Fmini-yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmiebergmann%2Fmini-yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimmiebergmann","download_url":"https://codeload.github.com/jimmiebergmann/mini-yaml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimmiebergmann%2Fmini-yaml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285028340,"owners_count":27102545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-18T02:00:05.759Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","deserialize","mini-yaml","parser","parsing","serialization","serializer","yaml"],"created_at":"2025-11-13T14:00:38.909Z","updated_at":"2025-11-18T08:03:20.919Z","avatar_url":"https://github.com/jimmiebergmann.png","language":"C++","readme":"# mini-yaml\n[![Build Status](https://travis-ci.org/jimmiebergmann/mini-yaml.svg?branch=master)](https://github.com/jimmiebergmann/mini-yaml#build-status)  \nSingle header YAML 1.0 C++11 serializer/deserializer.\n\n## Quickstart\n#### file.txt\n```\nkey: foo bar\nlist:\n  - hello world\n  - integer: 123\n    boolean: true\n```\n#### .cpp\n```cpp\nYaml::Node root;\nYaml::Parse(root, \"file.txt\");\n\n// Print all scalars.\nstd::cout \u003c\u003c root[\"key\"].As\u003cstd::string\u003e() \u003c\u003c std::endl;\nstd::cout \u003c\u003c root[\"list\"][0].As\u003cstd::string\u003e() \u003c\u003c std::endl;\nstd::cout \u003c\u003c root[\"list\"][1][\"integer\"].As\u003cint\u003e() \u003c\u003c std::endl;\nstd::cout \u003c\u003c root[\"list\"][1][\"boolean\"].As\u003cbool\u003e() \u003c\u003c std::endl;\n\n// Iterate second sequence item.\nNode \u0026 item = root[1];\nfor(auto it = item.Begin(); it != item.End(); it++)\n{\n    std::cout \u003c\u003c (*it).first \u003c\u003c \": \" \u003c\u003c (*it).second.As\u003cstring\u003e() \u003c\u003c std::endl;\n}\n```\n#### Output\n```\nfoo bar\nhello world\n123\n1\ninteger: 123\nboolean: true\n```\n\nSee  [Best practice](https://github.com/jimmiebergmann/mini-yaml#best-practice).\n\n## Usage\nPut [/yaml](https://github.com/jimmiebergmann/mini-yaml/blob/master/yaml) in your project directory and simply #include \"[yaml/Yaml.hpp](https://github.com/jimmiebergmann/mini-yaml/blob/master/yaml/Yaml.hpp)\".\nSee [examples/FirstExample.cpp](https://github.com/jimmiebergmann/mini-yaml/blob/master/examples/FirstExample.cpp) for additional examples.\n\n## Best practice\nAlways use references when accessing node content, if not intended to make a copy. Modifying copied node wont affect the original node content.  \nSee example:\n```cpp\nYaml::Node root;\n\nYaml::Node \u0026 ref = root;  // The content of \"root\" is not being copied.\nref[\"key\"] = \"value\";     // Modifying \"root\" node content.\n\nYaml::Node copy = root;   // The content of \"root\" is copied to \"copy\".\n                          // Slow operation if \"root\" contains a lot of content.\ncopy[\"key\"] = \"value\";    // Modifying \"copy\" node content. \"root\" is left untouched.\n```\n\n## Build status\nBuilds are passed if all tests are good and no memory leaks were found.\n\n| Branch | Status |\n| ------ | ------ |\n| master | [![Build Status](https://travis-ci.org/jimmiebergmann/mini-yaml.svg?branch=master)](https://travis-ci.org/jimmiebergmann/mini-yaml) |\n| dev | [![Build Status](https://travis-ci.org/jimmiebergmann/mini-yaml.svg?branch=dev)](https://travis-ci.org/jimmiebergmann/mini-yaml)|\n\n## Todo\n- Parse/serialize tags(!!type).\n- Parse anchors.\n- Parse flow sequences/maps.\n- Parse complex keys.\n- Parse sets.\n\n","funding_links":[],"categories":["Yaml"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmiebergmann%2Fmini-yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimmiebergmann%2Fmini-yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimmiebergmann%2Fmini-yaml/lists"}