PIValueTree::readChildValue method

some child-oriented methods
allow to create JSON from single PIValueTree
This commit is contained in:
2023-04-28 14:40:55 +03:00
parent 3ab57eea88
commit f5392f8b63
5 changed files with 31 additions and 2 deletions

View File

@@ -252,6 +252,7 @@ PIJSON toJSONTree(const PIValueTree & root, PIValueTreeConversions::Options opti
PIJSON PIValueTreeConversions::toJSON(const PIValueTree & root, Options options) {
if (options[IncludeRoot]) return toJSONTree(root, options);
PIJSON ret = PIJSON::newArray();
for (const auto & c: root.children())
ret << toJSONTree(c, options);