21 #include "softwarecontainer-log.h" 33 LOG_DECLARE_CLASS_CONTEXT(
"JSON",
"JSONParser");
47 static bool readOptional(
const json_t *element,
const char *key, std::string &result);
48 static bool readOptional(
const json_t *element,
const char *key,
bool &result);
49 static bool readOptional(
const json_t *element,
const char *key,
int &result);
63 static bool read(
const json_t *element,
const char *key, std::string &result);
77 static bool read(
const json_t *element,
const char *key,
bool &result);
91 static bool read(
const json_t *element,
const char *key,
int &result);
96 static bool hasKey(
const json_t *element,
const char *key);
Convenience layer for the Jansson JSON parser.
static bool readOptional(const json_t *element, const char *key, std::string &result)
Reads an optional value from a JSON object.
static bool hasKey(const json_t *element, const char *key)
Checks if a given JSON object contains a certain key.
Developers guide to adding a config item:
static bool read(const json_t *element, const char *key, std::string &result)
Reads a string from a JSON Object.