20 #include "filegatewayparser.h" 21 #include "jsonparser.h" 25 bool FileGatewayParser::parseConfigElement(
const json_t *element, FileSetting &setting)
28 log_error() <<
"path-host key missing or of wrong type";
33 log_error() <<
"path-container key missing or of wrong type";
37 if (setting.pathInHost.size() == 0) {
38 log_error() <<
"path-host setting is an empty string";
42 if (setting.pathInContainer.size() == 0) {
43 log_error() <<
"path-container setting is an empty string";
48 log_error() <<
"read-only has wrong format";
static bool readOptional(const json_t *element, const char *key, std::string &result)
Reads an optional value from a JSON object.
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.