#ifndef __JSON_UTILS_H__
#define __JSON_UTILS_H__

#ifdef  __cplusplus
extern "C" {
#endif

#include <json-c/json.h>

extern int get_size_from_json_arry_by_key(struct json_object *root, char *key, int *size);

extern int get_int_from_json_by_key(struct json_object *root, char *key, int *value);

extern int get_string_from_json_by_key_unescape(struct json_object *root, char *key, char *str, int str_len);

extern int get_string_from_json_by_key(struct json_object *root, char *key, char *str, int str_len);

extern int get_string_from_json_arry_by_key_unescape(struct json_object *root, char *key, char *str, int str_len, int index);

extern int get_string_from_json_arry_by_key(struct json_object *root, char *key, char *str, int str_len, int index);

extern int get_size_from_json_string_arry_by_key(char *json_buffer, char *key, int *size);

extern int get_int_from_json_string_by_key(char *json_buffer, char *key, int *value);

extern int get_string_from_json_string_arry_by_key_unescape(char *json_buffer, char *key, char *str, int str_len, int index);

extern int get_string_from_json_string_arry_by_key(char *json_buffer, char *key, char *str, int str_len, int index);

extern int get_string_from_json_string_by_key_unescape(char *json_buffer, char *key, char *str, int str_len);

extern int get_string_from_json_string_by_key(char *json_buffer, char *key, char *str, int str_len);

#ifdef  __cplusplus
}
#endif

#endif
