11#ifndef MYMPD_JSON_QUERY_H
12#define MYMPD_JSON_QUERY_H
14#include "dist/sds/sds.h"
bool json_get_uint_max(sds s, const char *path, unsigned *result, struct t_json_parse_error *error)
Definition json_query.c:215
bool json_get_object_string(sds s, const char *path, struct t_list *l, validate_callback vcb_key, validate_callback vcb_value, int max_elements, struct t_json_parse_error *error)
Definition json_query.c:550
bool json_get_int_max(sds s, const char *path, int *result, struct t_json_parse_error *error)
Definition json_query.c:103
bool(* iterate_callback)(const char *, sds, sds, enum json_vtype, validate_callback, void *, struct t_json_parse_error *)
Definition json_query.h:46
void json_parse_error_clear(struct t_json_parse_error *parse_error)
Definition json_query.c:53
bool json_find_key(sds s, const char *path)
Definition json_query.c:576
bool json_get_array_int64(sds s, const char *path, struct t_list *l, int max_elements, struct t_json_parse_error *error)
Definition json_query.c:510
json_vtype
Definition json_query.h:24
bool json_iterate_object(sds s, const char *path, iterate_callback icb, void *icb_userdata, validate_callback vcb_key, validate_callback vcb_value, int max_elements, struct t_json_parse_error *error)
Definition json_query.c:321
bool json_get_string(sds s, const char *path, size_t min, size_t max, sds *result, validate_callback vcb, struct t_json_parse_error *error)
Definition json_query.c:301
bool json_get_bool(sds s, const char *path, bool *result, struct t_json_parse_error *error)
Definition json_query.c:85
bool json_get_int(sds s, const char *path, int min, int max, int *result, struct t_json_parse_error *error)
Definition json_query.c:117
bool json_get_fields_as_string(sds s, sds *fields, struct t_json_parse_error *error)
Definition json_query.c:66
const char * get_mjson_toktype_name(enum json_vtype vtype)
Definition json_query.c:602
bool json_get_array_string(sds s, const char *path, struct t_list *l, validate_callback vcb, int max_elements, struct t_json_parse_error *error)
Definition json_query.c:468
bool json_get_uint(sds s, const char *path, unsigned min, unsigned max, unsigned *result, struct t_json_parse_error *error)
Definition json_query.c:229
bool json_get_int64(sds s, const char *path, int64_t min, int64_t max, int64_t *result, struct t_json_parse_error *error)
Definition json_query.c:187
sds json_get_key_as_sds(sds s, const char *path)
Definition json_query.c:589
sds list_to_json_array(sds s, struct t_list *l)
Definition json_print.c:231
bool json_get_string_max(sds s, const char *path, sds *result, validate_callback vcb, struct t_json_parse_error *error)
Definition json_query.c:259
bool json_get_string_cmp(sds s, const char *path, size_t min, size_t max, const char *cmp, sds *result, struct t_json_parse_error *error)
Definition json_query.c:278
bool json_get_time_max(sds s, const char *path, time_t *result, struct t_json_parse_error *error)
Definition json_query.c:147
bool json_get_int64_max(sds s, const char *path, int64_t *result, struct t_json_parse_error *error)
Definition json_query.c:173
bool json_get_fields(sds s, const char *path, struct t_fields *tags, int max_elements, struct t_json_parse_error *error)
Definition json_query.c:566
void json_parse_error_init(struct t_json_parse_error *parse_error)
Definition json_query.c:44
Linked list implementation.
Definition json_query.h:38
sds message
the error message
Definition json_query.h:39
sds path
the json path of the invalid value
Definition json_query.h:40
String validation functions.
bool(* validate_callback)(sds)
Definition validate.h:21