Monado OpenXR Runtime
xrt::auxiliary::util::json::JSONBuilder Class Reference

Helper class for building cJSON trees through operator<< More...

#include <util/u_json.hpp>

Public Member Functions

JSONBuilderoperator<< (const JSONValue &value)
 Receives "[", "]", "{", "}", or any of string, const char*, double, int, bool as inputs. More...
 
JSONNode::Ptr getBuiltNode ()
 Gets the built JSONNode or crash if the construction has not finished. More...
 

Detailed Description

Helper class for building cJSON trees through operator<<

JSONBuild is implemented with a pushdown automata to keep track of the JSON construction state.

Member Function Documentation

◆ getBuiltNode()

JSONNode::Ptr xrt::auxiliary::util::json::JSONBuilder::getBuiltNode ( )
inline

Gets the built JSONNode or crash if the construction has not finished.

◆ operator<<()

JSONBuilder& xrt::auxiliary::util::json::JSONBuilder::operator<< ( const JSONValue &  value)
inline

Receives "[", "]", "{", "}", or any of string, const char*, double, int, bool as inputs.

Updates the JSONBuilder state with it, after finishing the JSON tree, obtain the result with getBuiltNode.


The documentation for this class was generated from the following file: