yaml-cpp Questions

3

Solved

I'm using yaml-cpp on a for a variety of things on my project. Now I want to write out some data as JSON. Since JSON is a subset of YAML, at least for the features I need, I understand it should be...
Hashimoto asked 10/5, 2017 at 21:21

3

Solved

Given this code: void LoadFromYaml(const YAML::Node& node){ const YAML::Node& Data=node["Data"]; if(Data){ if(Data.ValueIsInt)// Do something with integer. if(Data.ValueIsFloat)// Do s...
Nolita asked 15/11, 2013 at 5:41

2

Solved

I am trying to compile my own c++/qt5.2 app which uses yaml-cpp under Ubuntu 14.04. While issuing the make command I get the following error fatal error: yaml-cpp/yaml.h: No such file or director...
Casemaker asked 14/5, 2014 at 13:37

8

Solved

Here's the complete log: /tmp/ccCvErNZ.o: In function `YAML::detail::node& YAML::detail::node_data::get<std::string>(std::string const&, std::shared_ptr<YAML::detail::memory_holde...
Ralston asked 4/4, 2016 at 12:54

6

Solved

I'm trying to use the new version of libyaml-cpp and having linker problems (undefined reference to 'YAML::LoadFile(std::basic_string<char, std::char_traits<char>, std::allocator<char&g...
Scarfskin asked 3/3, 2014 at 5:16

2

Solved

I'd like to obtain every node in a map without knowing the keys. My YAML looks like this: characterType : type1 : attribute1 : something attribute2 : something type2 : attribute1 : something...
Doglike asked 11/9, 2012 at 17:12

2

Is there a way to get the name of a node? For example: Fruits: - apple - orange - pear and in C++: YAML::Node fruit = parser["Fruits"]; cout << fruit.name() << endl; // should pr...
Feverish asked 27/3, 2014 at 15:24

2

Solved

I want to use yaml-cpp for a project of mine to generate a yaml-file however I have trouble figuring out how exactly I have to go about this. The yaml file I need to emit should look like this: act...
Xochitlxp asked 17/11, 2020 at 0:13

3

Solved

I am very new to yaml-cpp. I tried the simplest program, but it failed and, and I couldn't find the answer from GitHub repository. #include <iostream> #include "yaml-cpp/yaml.h" us...
Incarnate asked 16/4, 2014 at 11:30

1

Solved

I was trying to use yaml-cpp in my project. It took me half an hour to correctly link the library by experimenting with the following names. After I finally stumbled across them in this file, I set...
Trumpet asked 26/6, 2018 at 6:25

2

I know that during parsing, yaml-cpp can throw an exception that has nice file location (line and column number) information for where the exception occurred. How about post-parse? Is there any mec...
Alodi asked 21/9, 2014 at 18:27

2

Solved

Is it possible to emit and read(parse) binary data(image, file etc)? Like this is shown here: http://yaml.org/type/binary.html How can I do this in yaml-cpp?
Permutation asked 28/10, 2010 at 19:13

1

Solved

A total noob with yaml-cpp. I have a node something like this: numbers : [1,2,3,4,5] In the CPP file, I want to parse into a vector: std::vector<int> vi = node["numbers"]; This doesn't ...
Vapor asked 13/1, 2016 at 2:4

1

Solved

I am trying to parse a yaml usign yaml-cpp. This is my yaml: --- configuration: - height: 600 - widht: 800 - velocity: 1 - scroll: 30 types: - image: resources/images/grass.png name: gras...
Erubescent asked 10/9, 2015 at 3:0

1

Solved

How can I read this YAML file with yaml-cpp: sensors: - id: 5 hardwareId: 28-000005a32133 type: 1 - id: 6 hardwareId: 28-000005a32132 type: 4 I can't understand how can I get sensors item,...
Algometer asked 12/7, 2015 at 13:12

1

Solved

A previous answer describes how to check if a key exists in a yaml node using YAML::Node::FindValue("parameter"). Unfortunately, I can't call this in the latest version (0.5.1): error: ‘class YA...
Civilization asked 24/2, 2014 at 10:32

1

Solved

The use case is stepping through a configuration file written in YAML. I need to check each key and parse its value accordingly. I like the idea of using random-access methods like doc["key"] >&...
Firth asked 31/10, 2012 at 21:57

2

Solved

Is it possible to parse YAML formatted strings with yaml-cpp? There isn't a YAML::Parser::Parser(std::string&) constructor. (I'm getting a YAML string via libcurl from a http-server.)
Gantline asked 11/5, 2010 at 17:40

2

Solved

I have recently decided to use yaml as my configuration file technology, and am writing a c++ linux application on OpenSuse 11.3. The problem is that even after successfully installing cmake, comp...
Gman asked 17/4, 2011 at 13:9

1

I just started playing around with yaml-cpp, I managed to build it properly and run some of the examples from the yaml-cpp wiki but I can't find a way to save my emitter to a file. Is this not pos...
Counterpane asked 27/7, 2010 at 9:45

2

Solved

Is there a C++ library for emitting YAML? Wikipedia mentions a c++ wrapper for libyaml, but the link is broken. The official YAML site only offers yaml-cpp, which was also suggested in this SO ques...
Septuagint asked 16/4, 2009 at 4:36
1

© 2022 - 2025 — McMap. All rights reserved.