Questions tagged [yaml-cpp]

yaml-cpp is an open source C++ library, for parsing and emitting YAML.

yaml-cpp is an open source C++ library, hosted on GitHub, for parsing and emitting YAML.

314 questions
0
votes
0 answers

yamp-cpp messing up importing std::map data

So I have this yaml-cpp code: namespace YAML { template <> struct convert { static Node encode(const SpriteMetaData& spriteMetaData) { Node yamldata; yamldata["width"] = spriteMetaData.height; yamldata["height"] =…
ryanzec
  • 27,284
  • 38
  • 112
  • 169
0
votes
1 answer

When parsing YAML file using yaml-cpp, does it 'copy' all child nodes?

When parsing yaml file, normally we get root node from parser. And I'm wondering if I can reference the root node after parsing process. Like below. YAML::Node* globalRoot; void ParseDocument(filename) { YAML::Parser parser(fin) …
SeniorLee
  • 805
  • 1
  • 12
  • 25
0
votes
1 answer

No available mirrors for yaml-cpp

I'm trying to install mongodd using yaourt on archlinux which require the yaml-cpp lib to be installed. The thing is, yaourt is unable to find a valid mirror to download from error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from…
Théo Champion
  • 1,701
  • 1
  • 21
  • 46
0
votes
1 answer

How to get specific category names from yaml file?

I am using c++ and have a yaml file that looks like this: Food: Apple: - Type: grannysmith BellPepper: - Type: Red - Type: Green Sandwich: - Type: Ham I need to parse it so that I get a string vector listing only the food…
Noel Bahdy
  • 29
  • 4
0
votes
2 answers

CLion and Yaml-cpp: how can i build yaml-cpp with clion in windows

I had install yaml-cpp in linux successfully, then i want to install yaml-cpp in windows with clion. But when I build or install it, some errors happened. Such as: In file included from…
ansyser
  • 3
  • 1
  • 3
0
votes
1 answer

load yaml files from outside current directory

I want to load a yaml file from outside the working directory. I use c++. I used YAML::LoadFile("/home/example.yaml") and it complains YAML::BadFile. Please let me know if there is any way to do that.
code_fun
  • 1
  • 3
0
votes
1 answer

Issue Parsing File with YAML-CPP

In the following code, I'm having some sort of issue getting my .yaml file parsed using parser.GetNextDocument(doc);. After much gross debugging, I've found that the (main) issue here is that my for loop is not running, due to doc.size() == 0; What…
Andy
  • 3,132
  • 4
  • 36
  • 68
0
votes
0 answers

YAML::Emitter.size() different from strlen(YAML::Emitter.c_str())

Using YAML::Emitter I sometimes get YAML::Emitter.size() to return a bigger size than strlen(YAML::Emitter.c_str()). e.g. YAML::Emitter em; em << something; if (em.size() > strlen(em.c_str()) { std::cout << "WOW " << em.size() << " > " <<…
Periodic Maintenance
  • 1,698
  • 4
  • 20
  • 32
0
votes
1 answer

CMake - Linker error with static yaml-cpp as git submodule

I am trying to use yaml-cpp in my project. I am using cmake to build both my project and yaml-cpp which is a git submodule in my project. I have the boost library on my computer (required by yaml-cpp). I am building it statically. Using…
Ebatsin
  • 552
  • 5
  • 17
0
votes
0 answers

Linking yaml-cpp 0.5.x library with g++ 7.1.0

I'm attempting to compile a relatively simple program using yaml-cpp 0.5.3 with g++ 7.1.0, and am getting a linker error. The minimal program code is: #include int main(int i_iArg_Count, char * i_lpszArg_Values[]) { …
0
votes
0 answers

test yaml-cpp 0.5.3 issue

I am tried to know about yaml rules. And init.yaml file is like this: name: Ryan Braun position: LF Main code: int main() { YAML::Node node = YAML::LoadFile("init.yaml"); cout << node.Type() << endl; return 0; } This was just a…
crazymumu
  • 101
  • 2
  • 10
0
votes
1 answer

example for yaml-cpp 0.5.3 in linux

I am pretty new to yaml-cpp. After did tutorials, that tutorials are fine. But When I try to Parse my own yaml file, it's a litte difficult for me. I am confused with "operator" and "node". yaml file is shown below. Device: DeviceName:…
crazymumu
  • 101
  • 2
  • 10
0
votes
2 answers

How to save [x, y] in yaml file

In .yaml file. I know how to save x, y in world: radius: 20 x: -70 y: -30 My question is can I save it in the below format world: radius: 20 [-30, -70] Basically, I want to store two float number (x, y) in…
Allen Yuan
  • 77
  • 1
  • 6
0
votes
0 answers

using constexpr with yaml-cpp's node

Is it a way to use constexpr with yaml-cpp ? I tried : constexpr YAML::Node sample = YAML::LoadFile("sample.yaml"); but it seems that's not possible with the actual implementation of yaml ?
Kafka
  • 720
  • 6
  • 21
0
votes
0 answers

Does yaml-cpp license applies to organizations?

I'd like to use yaml-cpp for a project in my company. This project is part of a machine that will be sold to customers The license file provided in 0.5.3 give permission to "any person obtaining a copy", but what about companies/organizations who…
Chris
  • 1
  • 1