6085 const std::string yaml =
""
6094 "--- !!str a b" "\n"
6095 "--- !!str 'a: b'" "\n"
6112 CHECK(doc.is_doc());
6114 CHECK(root[0].has_val_tag());
6115 CHECK(root[0].val_tag() ==
"!!map");
6116 CHECK(root[1].val_tag() ==
"!map");
6117 CHECK(root[2].val_tag() ==
"!!seq");
6118 CHECK(root[3].val_tag() ==
"!!str");
6119 CHECK(root[4].val_tag() ==
"!!str");
6120 CHECK(root[5][
"a"].has_key_tag());
6121 CHECK(root[5][
"a"].key_tag() ==
"!!str");
6122 CHECK(root[6].val_tag() ==
"!!set");
6123 CHECK(root[7].val_tag() ==
"!!set");
6124 CHECK(root[8].val_tag() ==
"!!seq");
6125 CHECK(root[8][0].val_tag() ==
"!!int");
6126 CHECK(root[8][1].val_tag() ==
"!!str");
6175 CHECK(ryml::emitrs_yaml<std::string>(normalized_tree) ==
""
6184 "--- !!str a b" "\n"
6185 "--- !!str 'a: b'" "\n"
6199 CHECK(ryml::emitrs_yaml<std::string>(normalized_tree_long) ==
""
6200 "--- !<tag:yaml.org,2002:map>" "\n"
6205 "--- !<tag:yaml.org,2002:seq>" "\n"
6208 "--- !<tag:yaml.org,2002:str> a b" "\n"
6209 "--- !<tag:yaml.org,2002:str> 'a: b'" "\n"
6211 "!<tag:yaml.org,2002:str> a: b" "\n"
6212 "--- !<tag:yaml.org,2002:set>" "\n"
6215 "--- !<tag:yaml.org,2002:set>" "\n"
6217 "--- !<tag:yaml.org,2002:seq>" "\n"
6218 "- !<tag:yaml.org,2002:int> 0" "\n"
6219 "- !<tag:yaml.org,2002:str> 1" "\n"
!!float Mathematical integers.
void normalize_tags_long()
id_type num_children() const RYML_NOEXCEPT
O(num_children).
void parse_in_arena(Parser *parser, csubstr filename, csubstr yaml, Tree *tree, id_type node_id)
(1) parse YAML into an existing tree node. The filename will be used in any error messages arising du...
csubstr from_tag(YamlTag_e tag)
csubstr normalize_tag_long(csubstr tag)
csubstr from_tag_long(YamlTag_e tag)
csubstr to_csubstr(const char(&s)[N]) noexcept
csubstr normalize_tag(csubstr tag)
bool is_stream() const RYML_NOEXCEPT
Forward to Tree::is_stream().
#define CHECK(predicate)
a testing assertion, used only in this quickstart
Holds a pointer to an existing tree, and a node id.
!!set Unordered set of non-equal values.
NodeRef rootref()
Get the root as a NodeRef . Note that a non-const Tree implicitly converts to NodeRef.
!!map Unordered set of key: value pairs without duplicates.
!!seq Sequence of arbitrary values.
const_children_view children() const RYML_NOEXCEPT
get an iterable view over children
YamlTag_e to_tag(csubstr tag)
!!str A sequence of zero or more Unicode characters.