34 #include <yajl/yajl_common.h>
55 #define YAJL_NUMBER_INT_VALID 0x01
56 #define YAJL_NUMBER_DOUBLE_VALID 0x02
122 char *error_buffer,
size_t error_buffer_size);
150 #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string))
151 #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number))
152 #define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID))
153 #define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID))
154 #define YAJL_IS_OBJECT(v) (((v) != NULL) && ((v)->type == yajl_t_object))
155 #define YAJL_IS_ARRAY(v) (((v) != NULL) && ((v)->type == yajl_t_array ))
156 #define YAJL_IS_TRUE(v) (((v) != NULL) && ((v)->type == yajl_t_true ))
157 #define YAJL_IS_FALSE(v) (((v) != NULL) && ((v)->type == yajl_t_false ))
158 #define YAJL_IS_NULL(v) (((v) != NULL) && ((v)->type == yajl_t_null ))
162 #define YAJL_GET_STRING(v) (YAJL_IS_STRING(v) ? (v)->u.string : NULL)
166 #define YAJL_GET_NUMBER(v) ((v)->u.number.r)
170 #define YAJL_GET_DOUBLE(v) ((v)->u.number.d)
174 #define YAJL_GET_INTEGER(v) ((v)->u.number.i)
177 #define YAJL_GET_OBJECT(v) (YAJL_IS_OBJECT(v) ? &(v)->u.object : NULL)
180 #define YAJL_GET_ARRAY(v) (YAJL_IS_ARRAY(v) ? &(v)->u.array : NULL)
yajl_type
Definition: yajl_tree.h:41
Definition: yajl_tree.h:52
yajl_type type
Definition: yajl_tree.h:72
unsigned int flags
Definition: yajl_tree.h:85
Definition: yajl_tree.h:44
Definition: yajl_tree.h:47
char * r
Definition: yajl_tree.h:81
#define YAJL_API
Definition: yajl_common.h:41
YAJL_API yajl_val yajl_tree_get(yajl_val parent, const char **path, yajl_type type)
struct yajl_val_s::@0::@1 number
const char ** keys
Definition: yajl_tree.h:88
long long i
Definition: yajl_tree.h:79
Definition: yajl_tree.h:46
Definition: yajl_tree.h:42
YAJL_API yajl_val yajl_tree_parse(const char *input, char *error_buffer, size_t error_buffer_size)
YAJL_API void yajl_tree_free(yajl_val v)
Definition: yajl_tree.h:68
double d
Definition: yajl_tree.h:80
struct yajl_val_s * yajl_val
Definition: yajl_tree.h:59
Definition: yajl_tree.h:48
size_t len
Definition: yajl_tree.h:90
struct yajl_val_s::@0::@2 object
Definition: yajl_tree.h:45
yajl_val * values
Definition: yajl_tree.h:89
Definition: yajl_tree.h:43
struct yajl_val_s::@0::@3 array
char * string
Definition: yajl_tree.h:77