namespace gss_eap_util {
class JSONObject;
+ class JSONException : public std::exception {
+ public:
+ JSONException(json_t *obj = NULL, json_type type = JSON_NULL);
+
+ ~JSONException(void) throw() {
+ json_decref(m_obj);
+ }
+
+ virtual const char *what(void) const throw() {
+ return m_reason.c_str();
+ }
+
+ private:
+ json_t *m_obj;
+ json_type m_type;
+ std::string m_reason;
+ };
+
class JSONIterator {
public:
JSONIterator(const JSONObject &obj);
json_int_t integer(void) const;
double real(void) const;
double number(void) const;
- bool isnull(void) const;
DDF ddf(void) const;
+ bool isObject(void) const;
+ bool isArray(void) const;
+ bool isString(void) const;
+ bool isInteger(void) const;
+ bool isNumber(void) const;
+ bool isBoolean(void) const;
+ bool isNull(void) const;
+
~JSONObject(void)
{
if (m_obj != NULL)