Functions for dealing with JSON.
Definition at line 15 of file VuoJsonUtilities.hh.
Static Public Member Functions | |
static string | parseString (json_object *o, string key, string defaultString="", bool *foundValue=NULL) |
Parses the string value for key in the top level of the JSON object. More... | |
static string | parseObjectString (json_object *o, string outerKey, string innerKey, string defaultString="", bool *foundValue=NULL) |
Parses the string value for path outerKey/innerKey of the JSON object. More... | |
static int | parseInt (json_object *o, string key, int defaultInt=0, bool *foundValue=NULL) |
Parses the integer value for key in the top level of the JSON object. More... | |
static bool | parseBool (json_object *o, string key, bool defaultBool=false, bool *foundValue=NULL) |
Parses the boolean value for key in the top level of the JSON object. More... | |
static vector< string > | parseArrayOfStrings (json_object *o, string key) |
Parses the array-of-strings value for key in the top level of the JSON object. More... | |
static json_object * | getJson (vector< string > strings) |
Converts a vector of std::strings into a JSON array of strings. More... | |
|
static |
Converts a vector of std::strings into a JSON array of strings.
Definition at line 144 of file VuoJsonUtilities.cc.
|
static |
Parses the array-of-strings value for key
in the top level of the JSON object.
If no such value is found, returns an empty vector.
Definition at line 121 of file VuoJsonUtilities.cc.
|
static |
Parses the boolean value for key
in the top level of the JSON object.
If no such value is found, returns defaultBool
.
Definition at line 96 of file VuoJsonUtilities.cc.
|
static |
Parses the integer value for key
in the top level of the JSON object.
If no such value is found, returns defaultInt
.
Definition at line 71 of file VuoJsonUtilities.cc.
|
static |
Parses the string value for path outerKey/innerKey
of the JSON object.
If no such value is found, returns defaultString
.
Definition at line 42 of file VuoJsonUtilities.cc.
|
static |
Parses the string value for key
in the top level of the JSON object.
If no such value is found, returns defaultString
.
Definition at line 17 of file VuoJsonUtilities.cc.