kamchatka-volcano / figcone

Read JSON, YAML, TOML, XML or INI configuration by declaring a struct
Microsoft Public License
100 stars 2 forks source link

Add figcone::TreeNode::Any, an alternative that can be either TreeNode::Item or TreeNode::List. #12

Closed kamchatka-volcano closed 7 months ago

kamchatka-volcano commented 1 year ago

It should be possible to read FIGCONE_NODE_LIST from figcone::TreeNode::Any. It should also be possible to read FIGCONE_NODE from figcone::TreeNode::Any if it contains a single element; otherwise, this should lead to an error.

This would allow the use of YAML with multiple document sections or JSON with a root node array (TCfg readYamlFile(const std::filesystem::path& configFile) would be changed to std::vector<TCfg> readYamlFile(const std::filesystem::path& configFile). It would also be possible to enable the proper support for XML node lists by allowing child elements to have any name.

kamchatka-volcano commented 7 months ago

Closed in v3.0.0