24#if VSF_USE_JSON == ENABLED
28#if defined(__VSF_JSON_CLASS_IMPLEMENT)
29# define __VSF_CLASS_IMPLEMENT__
30# undef __VSF_JSON_CLASS_IMPLEMENT
31#elif defined(__VSF_JSON_CLASS_INHERIT__)
32# define __VSF_CLASS_INHERIT__
33# undef __VSF_JSON_CLASS_INHERIT__
45#define vsf_json_set_object(__c, __key, ...) \
47 int len = vsf_json_set_key((__c), (__key)); \
49 (__c)->first = true; \
50 len = vsf_json_write_str((__c), "{", 1); \
53 len = vsf_json_write_str((__c), "}", 1); \
58#define vsf_json_set_array(__c, __key, ...) \
60 int len = vsf_json_set_key((__c), (__key)); \
62 (__c)->first = true; \
63 len = vsf_json_write_str((__c), "[", 1); \
66 len = vsf_json_write_str((__c), "]", 1); \
97 int (*write_str)(
void *,
char *, int);
109extern char *
vsf_json_get(
const char *json,
const char *key);
120 int (*write_str)(
void *,
char *,
int));
unsigned int uint32_t
Definition lvgl.h:43
#define vsf_class(__name)
Definition ooc_class.h:48
vk_av_control_value_t value
Definition vsf_audio.h:171
vk_av_control_type_t type
Definition vsf_audio.h:170
int vsf_json_set_null(vsf_json_constructor_t *c, char *key)
Definition vsf_json.c:463
int vsf_json_write_str(vsf_json_constructor_t *c, char *buf, int len)
Definition vsf_json.c:347
int vsf_json_set_boolean(vsf_json_constructor_t *c, char *key, bool value)
Definition vsf_json.c:457
vsf_json_type_t vsf_json_enumerate_start(vsf_json_enumerator_t *e, const char *json)
Definition vsf_json.c:72
char * vsf_json_get(const char *json, const char *key)
Definition vsf_json.c:188
int vsf_json_constructor_buffer_write_str(void *param, char *str, int len)
Definition vsf_json.c:469
int vsf_json_get_string(const char *json, char *result, int len)
Definition vsf_json.c:250
int vsf_json_set_double(vsf_json_constructor_t *c, char *key, double value)
Definition vsf_json.c:444
int vsf_json_get_boolean(const char *json, bool *result)
Definition vsf_json.c:317
int vsf_json_num_of_entry(const char *json)
Definition vsf_json.c:175
int vsf_json_set_key(vsf_json_constructor_t *c, char *key)
Definition vsf_json.c:367
int vsf_json_set_integer(vsf_json_constructor_t *c, char *key, int value)
Definition vsf_json.c:431
int vsf_json_set_string(vsf_json_constructor_t *c, char *key, char *value)
Definition vsf_json.c:392
vsf_json_type_t
Definition vsf_json.h:72
@ VSF_JSON_TYPE_STRING
Definition vsf_json.h:76
@ VSF_JSON_TYPE_BOOLEAN
Definition vsf_json.h:78
@ VSF_JSON_TYPE_ARRAY
Definition vsf_json.h:75
@ VSF_JSON_TYPE_NULL
Definition vsf_json.h:79
@ VSF_JSON_TYPE_INVALID
Definition vsf_json.h:73
@ VSF_JSON_TYPE_NUMBER
Definition vsf_json.h:77
@ VSF_JSON_TYPE_OBJECT
Definition vsf_json.h:74
void vsf_json_constructor_init(vsf_json_constructor_t *c, void *param, int(*write_str)(void *, char *, int))
Definition vsf_json.c:334
int vsf_json_get_number(const char *json, double *result)
Definition vsf_json.c:304
char * vsf_json_enumerate_next(vsf_json_enumerator_t *e)
Definition vsf_json.c:90
vsf_json_type_t vsf_json_get_type(const char *json)
Definition vsf_json.c:43