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
1 answer

build yaml-cpp lib with -m32 (32-bit) - on linux /w gcc or llvm

subject pretty much says it all: I downloaded yaml-cpp version 0.6.3. I need to compile on linux x86_64, target linux x86_32 (build on 64 bit, use result on 32-bit) I have been trying to add a new "YAML_BUILD_32BIT" option - similar to the existing…
Henry Cox
  • 21
  • 3
0
votes
1 answer

Retrieve anchor & alias string in yaml-cpp from document

I've looked through the yaml-cpp documentation & source code and know that linking of anchored nodes is handled by yaml-cpp lib but I would still like to access the string value of anchor so I could reuse it as a id for the dictionary of anchor/node…
tgs_stdio
  • 151
  • 1
  • 3
0
votes
3 answers

Parsing yaml files with yaml-cpp

I'm having problem with parsing yaml files using yaml-cpp, I'm making a application using wxWidgets and I'm trying to read the frame size from a yaml file which looks like, --- This is the configuration file for the Sample Browser, feel free to edit…
apoorv569
  • 143
  • 1
  • 12
0
votes
1 answer

How to create the top object with yaml-cpp?

I am trying to create a config file for my application using yaml-cpp, I am able to create map by YAML::Emitter emitter; emitter << YAML::BeginMap; emitter << YAML::Key << "Autoplay" << YAML::Value << "false"; emitter <<…
apoorv569
  • 143
  • 1
  • 12
0
votes
1 answer

Can we make different folders for prod and non-prod in multistage YAML Pipeline?

We have around 13 prod and 13 non-prod environments in multistage YAML pipeline, due to this the performance is very slow. Can we keep prod and non-prod in a separate folder, so that while deploying we can run ci/cd independently. Please…
0
votes
1 answer

YAML file found, but unable to parse content

I'm trying to parse a YAML configuration file using yaml-cpp (https://github.com/jbeder/yaml-cpp), Visual Studio 2019 Community. #include #include "yaml-cpp/yaml.h" int main(int argc, char* argv[]) { YAML::Node config; try …
Xobtah
  • 464
  • 7
  • 20
0
votes
1 answer

What should be the correct rule to specify in alert_rules.yml file in prometheus

Below is the yam file i am currently using. groups: - name: alertname rules: - alert: InstanceDown expr: up == 0 for: 1m Below is the error I got after passing it through the prom tool in Prometheus. Checking alert_rules.yml …
Ashish
  • 1
  • 1
0
votes
1 answer

Is it possible set the base level of Emitter indentation in yaml-cpp?

Is there a one-time way to set the base level of indentation for all values that Emitter emits in yaml-cpp? I tried using Emitter::SetIndent and Emitter::SetLocalIndent but those only seem to affect items below the root level of the emitter, not…
Joe
  • 5,394
  • 3
  • 23
  • 54
0
votes
1 answer

yaml-cpp always creates a scalar node with size 0

I'd like to use yaml-cpp for storeing some config-values. In order to get in touch with yaml-cpp, I've written a method which creates a node (_config is from Type YAML::Node), put some values in it and write it into a file: void write_config() …
0
votes
1 answer

YAML ofstream emitter

I find this example: ofstream ofstr("output.yaml"); YAML::Emitter out(ofstr); out << some_large_document; // not necessary anymore: // ofstr << out.c_str() But when i try use it, i have: D:\work\C\map.cpp||In function `int…
spumer
  • 3
  • 1
0
votes
1 answer

YAML::Emitter stream size

I have an iterative algorithm, written in C++. I am using yaml-cpp. On each iteration I send send some data to a YAML::Emitter object. When the algorithm terminates I use YAML::Emitter::c_str() to write the underlying buffer to an ofstream.…
wjastle
  • 157
  • 1
  • 7
0
votes
1 answer

Can I rename a node in yaml-cpp?

Suppose that I have a YAML entry like foo: bar. Can I use yaml-cpp to rename the key foo to buz without having to copy all the content? In other words, I know that I can do this: YAML::Node node = YAML::Load("foo:bar"); YAML::Node…
space_voyager
  • 1,984
  • 3
  • 20
  • 31
0
votes
1 answer

yaml-cpp create a new empty map?

How can I create a new YAML parameter that is an empty map (the use-case is to populate it in some later part of the code)? Minimal working example: YAML::Node node = YAML::LoadFile("config.yaml"); node["new_map"] = "{}"; // this creates a string,…
space_voyager
  • 1,984
  • 3
  • 20
  • 31
0
votes
1 answer

YAML::TypedBadConversion yaml-cpp on NTRTsim

I am using NASA Tensegrity Robot Toolkit simulator, which uses YAML to build the structure. i have validated my structure from https://codebeautify.org/yaml-validator. It keeps throwing the error of bad conversion on my file while works fine on a…
Jin
  • 3
  • 2
0
votes
0 answers

How to use a c++ library written in a cmake project into another cmake project

I am newbie to cmake and I am pretty sure this is the problem I am facing here. I am trying to use the yaml-cpp library which is written in cmake project into my own cmake project. I run the following commands to build and install the yaml-cpp in…