yaml-cpp/util/sandbox.cpp

25 lines
660 B
C++
Raw Normal View History

2012-05-20 10:46:08 +04:00
#include "yaml-cpp/yaml.h"
#include <iostream>
int main()
{
YAML::Emitter out;
2012-05-22 08:23:53 +04:00
out << YAML::Anchor("monkey") << YAML::LocalTag("a");
2012-05-22 06:04:10 +04:00
out << YAML::BeginSeq;
2012-05-20 10:46:08 +04:00
out << "foo";
2012-05-22 08:19:29 +04:00
out << YAML::LocalTag("hi") << "bar";
2012-05-22 08:23:53 +04:00
out << YAML::Anchor("asdf") << YAML::BeginMap;
2012-05-22 08:37:49 +04:00
out << "a" << "b" << "c";
2012-05-22 08:29:59 +04:00
out << YAML::Anchor("a") << YAML::BeginMap;
2012-05-22 08:37:49 +04:00
out << YAML::Anchor("d") << "a" << "b";
2012-05-22 08:29:59 +04:00
out << YAML::EndMap;
out << YAML::EndMap;
2012-05-22 08:23:53 +04:00
out << YAML::LocalTag("hi") << YAML::BeginSeq;
2012-05-22 08:37:49 +04:00
out << "a" << "b" << YAML::Alias("monkey");
2012-05-22 08:23:53 +04:00
out << YAML::EndSeq;
2012-05-22 06:04:10 +04:00
out << YAML::EndSeq;
2012-05-20 10:46:08 +04:00
std::cout << out.c_str() << "\n";
return 0;
}