25 #ifndef SPA_UTILS_JSON_POD_H
26 #define SPA_UTILS_JSON_POD_H
134 char *val = (
char*)alloca(len+1);
157 const struct spa_type_info *info,
const char *value,
int len)
static const struct spa_type_info * spa_debug_type_find(const struct spa_type_info *info, uint32_t type)
Definition: types.h:46
static const struct spa_type_info * spa_debug_type_find_short(const struct spa_type_info *info, const char *name)
Definition: types.h:104
static int spa_json_to_pod(struct spa_pod_builder *b, uint32_t flags, const struct spa_type_info *info, const char *value, int len)
Definition: json-pod.h:161
static int spa_json_to_pod_part(struct spa_pod_builder *b, uint32_t flags, uint32_t id, const struct spa_type_info *info, struct spa_json *iter, const char *value, int len)
Definition: json-pod.h:52
static bool spa_json_is_float(const char *val, int len)
Definition: json.h:257
static int spa_json_parse_float(const char *val, int len, float *result)
Definition: json.h:248
static int spa_json_parse_stringn(const char *val, int len, char *result, int maxlen)
Definition: json.h:363
static void spa_json_enter(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:76
static int spa_json_parse_bool(const char *val, int len, bool *result)
Definition: json.h:321
static int spa_json_get_string(struct spa_json *iter, char *res, int maxlen)
Definition: json.h:431
static bool spa_json_is_bool(const char *val, int len)
Definition: json.h:316
static bool spa_json_is_array(const char *val, int len)
Definition: json.h:232
static bool spa_json_is_null(const char *val, int len)
Definition: json.h:242
static int spa_json_next(struct spa_json *iter, const char **value)
Get the next token.
Definition: json.h:86
static void spa_json_init(struct spa_json *iter, const char *data, size_t size)
Definition: json.h:69
static bool spa_json_is_int(const char *val, int len)
Definition: json.h:291
static int spa_json_is_object(const char *val, int len)
Definition: json.h:222
static int spa_pod_builder_prop(struct spa_pod_builder *builder, uint32_t key, uint32_t flags)
Definition: builder.h:470
static int spa_pod_builder_string(struct spa_pod_builder *builder, const char *str)
Definition: builder.h:325
static int spa_pod_builder_float(struct spa_pod_builder *builder, float val)
Definition: builder.h:285
static void * spa_pod_builder_pop(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:188
static int spa_pod_builder_double(struct spa_pod_builder *builder, double val)
Definition: builder.h:294
static int spa_pod_builder_id(struct spa_pod_builder *builder, uint32_t val)
Definition: builder.h:258
static int spa_pod_builder_none(struct spa_pod_builder *builder)
Definition: builder.h:233
static int spa_pod_builder_push_array(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:392
static int spa_pod_builder_push_struct(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:442
static int spa_pod_builder_bool(struct spa_pod_builder *builder, bool val)
Definition: builder.h:249
static int spa_pod_builder_int(struct spa_pod_builder *builder, int32_t val)
Definition: builder.h:267
static int spa_pod_builder_push_object(struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t type, uint32_t id)
Definition: builder.h:455
static int spa_pod_builder_long(struct spa_pod_builder *builder, int64_t val)
Definition: builder.h:276
static bool spa_atou32(const char *str, uint32_t *val, int base)
Convert str to an uint32_t with the given base and store the result in val.
Definition: string.h:148
@ SPA_TYPE_Int
Definition: type.h:54
@ SPA_TYPE_Long
Definition: type.h:55
@ SPA_TYPE_Bool
Definition: type.h:52
@ SPA_TYPE_Float
Definition: type.h:56
@ SPA_TYPE_Double
Definition: type.h:57
@ SPA_TYPE_Id
Definition: type.h:53
@ SPA_TYPE_String
Definition: type.h:58
@ SPA_TYPE_Struct
Definition: type.h:64
uint32_t type
Definition: type.h:163
uint32_t parent
Definition: type.h:164
const struct spa_type_info * values
Definition: type.h:166