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:251
static int spa_json_parse_float(const char *val, int len, float *result)
Definition: json.h:245
static int spa_json_parse_stringn(const char *val, int len, char *result, int maxlen)
Definition: json.h:325
static void spa_json_enter(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:73
static int spa_json_parse_bool(const char *val, int len, bool *result)
Definition: json.h:302
static int spa_json_get_string(struct spa_json *iter, char *res, int maxlen)
Definition: json.h:376
static bool spa_json_is_bool(const char *val, int len)
Definition: json.h:297
static bool spa_json_is_array(const char *val, int len)
Definition: json.h:229
static bool spa_json_is_null(const char *val, int len)
Definition: json.h:239
static int spa_json_next(struct spa_json *iter, const char **value)
Get the next token.
Definition: json.h:83
static void spa_json_init(struct spa_json *iter, const char *data, size_t size)
Definition: json.h:66
static bool spa_json_is_int(const char *val, int len)
Definition: json.h:272
static int spa_json_is_object(const char *val, int len)
Definition: json.h:219
static int spa_pod_builder_prop(struct spa_pod_builder *builder, uint32_t key, uint32_t flags)
Definition: builder.h:468
static int spa_pod_builder_string(struct spa_pod_builder *builder, const char *str)
Definition: builder.h:323
static int spa_pod_builder_float(struct spa_pod_builder *builder, float val)
Definition: builder.h:283
static void * spa_pod_builder_pop(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:186
static int spa_pod_builder_double(struct spa_pod_builder *builder, double val)
Definition: builder.h:292
static int spa_pod_builder_id(struct spa_pod_builder *builder, uint32_t val)
Definition: builder.h:256
static int spa_pod_builder_none(struct spa_pod_builder *builder)
Definition: builder.h:231
static int spa_pod_builder_push_array(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:390
static int spa_pod_builder_push_struct(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:440
static int spa_pod_builder_bool(struct spa_pod_builder *builder, bool val)
Definition: builder.h:247
static int spa_pod_builder_int(struct spa_pod_builder *builder, int32_t val)
Definition: builder.h:265
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:453
static int spa_pod_builder_long(struct spa_pod_builder *builder, int64_t val)
Definition: builder.h:274
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:146
@ 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