| 52 | return boost::apply_visitor(GetStringVisitor(), node.value()); |
| 53 | } |
| 54 | inline std::string getJSONStringFromTree(PathTree const &tree, |
| 55 | std::string const &path) { |
| 56 | try { |
| 57 | auto const &desiredNode = tree.getNodeByPath(path); |
| 58 | return getJSONStringAtNode(desiredNode); |
| 59 | } catch (util::tree::NoSuchChild &) { |
| 60 | return std::string{}; |
| 61 | } |
| 62 | } |
| 63 | } // namespace common |
| 64 | } // namespace osvr |
| 65 |
no test coverage detected