31 #ifndef JSONDECODER_H_ 32 #define JSONDECODER_H_ 34 #include "../Exception.h" 35 #include "../Variable.h" 56 static std::shared_ptr<Variable> decode(
const std::string &
json);
57 static std::shared_ptr<Variable> decode(
const std::string &json, uint32_t &bytesRead);
58 static std::shared_ptr<Variable> decode(
const std::vector<char> &json);
59 static std::shared_ptr<Variable> decode(
const std::vector<char> &json, uint32_t &bytesRead);
61 static std::string decodeString(
const std::string &s);
63 static inline bool posValid(
const std::string &json, uint32_t pos);
64 static inline bool posValid(
const std::vector<char> &json, uint32_t pos);
65 static void skipWhitespace(
const std::string &json, uint32_t &pos);
66 static void skipWhitespace(
const std::vector<char> &json, uint32_t &pos);
67 static void decodeObject(
const std::string &json, uint32_t &pos, std::shared_ptr<Variable> &variable);
68 static void decodeObject(
const std::vector<char> &json, uint32_t &pos, std::shared_ptr<Variable> &variable);
69 static void decodeArray(
const std::string &json, uint32_t &pos, std::shared_ptr<Variable> &variable);
70 static void decodeArray(
const std::vector<char> &json, uint32_t &pos, std::shared_ptr<Variable> &variable);
71 static void decodeString(
const std::string &json, uint32_t &pos, std::shared_ptr<Variable> &
value);
72 static void decodeString(
const std::vector<char> &json, uint32_t &pos, std::shared_ptr<Variable> &value);
73 static void decodeString(
const std::string &json, uint32_t &pos, std::string &s);
74 static void decodeString(
const std::vector<char> &json, uint32_t &pos, std::string &s);
75 static bool decodeValue(
const std::string &json, uint32_t &pos, std::shared_ptr<Variable> &value);
76 static bool decodeValue(
const std::vector<char> &json, uint32_t &pos, std::shared_ptr<Variable> &value);
77 static void decodeBoolean(
const std::string &json, uint32_t &pos, std::shared_ptr<Variable> &value);
78 static void decodeBoolean(
const std::vector<char> &json, uint32_t &pos, std::shared_ptr<Variable> &value);
79 static void decodeNull(
const std::string &json, uint32_t &pos, std::shared_ptr<Variable> &value);
80 static void decodeNull(
const std::vector<char> &json, uint32_t &pos, std::shared_ptr<Variable> &value);
81 static bool decodeNumber(
const std::string &json, uint32_t &pos, std::shared_ptr<Variable> &value);
82 static bool decodeNumber(
const std::vector<char> &json, uint32_t &pos, std::shared_ptr<Variable> &value);
JsonDecoderException(std::string message)
Definition: JsonDecoder.h:47
JsonDecoder(BaseLib::SharedObjects *dummy)
Definition: JsonDecoder.h:53
This is the base library main class.
Definition: BaseLib.h:95
Definition: BaseLib.cpp:34
Definition: JsonDecoder.h:45
PVariable value
Definition: UiElements.h:217
Base class for all exceptions defined in Homegear.
Definition: Exception.h:41
Definition: JsonDecoder.h:50