Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/zbxjson/jsonpath.c')
-rw-r--r--src/libs/zbxjson/jsonpath.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/src/libs/zbxjson/jsonpath.c b/src/libs/zbxjson/jsonpath.c
index 5341837073d..f29277e7d4e 100644
--- a/src/libs/zbxjson/jsonpath.c
+++ b/src/libs/zbxjson/jsonpath.c
@@ -115,8 +115,6 @@ static void zbx_vector_json_clear_ext(zbx_vector_json_t *elements)
/******************************************************************************
* *
- * Function: zbx_jsonpath_error *
- * *
* Purpose: set json error message and return FAIL *
* *
* Comments: This function is used to return from json path parsing functions *
@@ -135,8 +133,6 @@ static int zbx_jsonpath_error(const char *path)
/******************************************************************************
* *
- * Function: jsonpath_strndup *
- * *
******************************************************************************/
static char *jsonpath_strndup(const char *source, size_t len)
{
@@ -151,8 +147,6 @@ static char *jsonpath_strndup(const char *source, size_t len)
/******************************************************************************
* *
- * Function: jsonpath_unquote *
- * *
* Purpose: unquote single or double quoted string by stripping *
* leading/trailing quotes and unescaping backslash sequences *
* *
@@ -178,8 +172,6 @@ static void jsonpath_unquote(char *value, const char *start, size_t len)
/******************************************************************************
* *
- * Function: jsonpath_unquote_dyn *
- * *
* Purpose: unquote string stripping leading/trailing quotes and unescaping *
* backspace sequences *
* *
@@ -202,8 +194,6 @@ static char *jsonpath_unquote_dyn(const char *start, size_t len)
/******************************************************************************
* *
- * Function: jsonpath_list_create_item *
- * *
* Purpose: create jsonpath list item of the specified size *
* *
******************************************************************************/
@@ -214,8 +204,6 @@ static zbx_jsonpath_list_node_t *jsonpath_list_create_node(size_t size)
/******************************************************************************
* *
- * Function: jsonpath_list_free *
- * *
* Purpose: free jsonpath list *
* *
******************************************************************************/
@@ -232,8 +220,6 @@ static void jsonpath_list_free(zbx_jsonpath_list_node_t *list)
/******************************************************************************
* *
- * Function: jsonpath_create_token *
- * *
* Purpose: create jsonpath expression token *
* *
* Parameters: type - [IN] the token type *
@@ -269,8 +255,6 @@ static zbx_jsonpath_token_t *jsonpath_create_token(int type, const char *express
/******************************************************************************
* *
- * Function: jsonpath_token_free *
- * *
******************************************************************************/
static void jsonpath_token_free(zbx_jsonpath_token_t *token)
{
@@ -280,8 +264,6 @@ static void jsonpath_token_free(zbx_jsonpath_token_t *token)
/******************************************************************************
* *
- * Function: jsonpath_reserve *
- * *
* Purpose: reserve space in jsonpath segments array for more segments *
* *
* Parameters: jsonpath - [IN] the jsonpath data *
@@ -312,8 +294,6 @@ static void jsonpath_reserve(zbx_jsonpath_t *jsonpath, int num)
/******************************************************************************
* *
- * Function: jsonpath_segment_clear *
- * *
******************************************************************************/
static void jsonpath_segment_clear(zbx_jsonpath_segment_t *segment)
{
@@ -334,8 +314,6 @@ static void jsonpath_segment_clear(zbx_jsonpath_segment_t *segment)
/******************************************************************************
* *
- * Function: jsonpath_next *
- * *
* Purpose: find next component of json path *
* *
* Parameters: pnext - [IN/OUT] the reference to the next path component *
@@ -415,8 +393,6 @@ static int jsonpath_next(const char **pnext)
/******************************************************************************
* *
- * Function: jsonpath_parse_substring *
- * *
* Purpose: parse single or double quoted substring *
* *
* Parameters: start - [IN] the substring start *
@@ -452,8 +428,6 @@ static int jsonpath_parse_substring(const char *start, int *len)
/******************************************************************************
* *
- * Function: jsonpath_parse_path *
- * *
* Purpose: parse jsonpath reference *
* *
* Parameters: start - [IN] the jsonpath start *
@@ -482,8 +456,6 @@ static int jsonpath_parse_path(const char *start, int *len)
/******************************************************************************
* *
- * Function: jsonpath_parse_number *
- * *
* Purpose: parse number value *
* *
* Parameters: start - [IN] the number start *
@@ -520,8 +492,6 @@ static int jsonpath_parse_number(const char *start, int *len)
/******************************************************************************
* *
- * Function: jsonpath_expression_next_token *
- * *
* Purpose: get next token in jsonpath expression *
* *
* Parameters: exprsesion - [IN] the jsonpath expression *
@@ -676,8 +646,6 @@ out:
/******************************************************************************
* *
- * Function: jsonpath_parse_expression *
- * *
* Purpose: parse jsonpath filter expression in format *
* *
* Parameters: expression - [IN] the expression, including opening and *
@@ -876,8 +844,6 @@ cleanup:
/******************************************************************************
* *
- * Function: jsonpath_parse_names *
- * *
* Purpose: parse a list of single or double quoted names, including trivial *
* case when a single name is used *
* *
@@ -990,8 +956,6 @@ out:
/******************************************************************************
* *
- * Function: jsonpath_parse_indexes *
- * *
* Purpose: parse a list of array indexes or range start:end values *
* case when a single name is used *
* *
@@ -1139,8 +1103,6 @@ out:
/******************************************************************************
* *
- * Function: jsonpath_parse_bracket_segment *
- * *
* Purpose: parse jsonpath bracket notation segment *
* *
* Parameters: start - [IN] the segment start *
@@ -1197,8 +1159,6 @@ static int jsonpath_parse_bracket_segment(const char *start, zbx_jsonpath_t *jso
/******************************************************************************
* *
- * Function: jsonpath_parse_dot_segment *
- * *
* Purpose: parse jsonpath dot notation segment *
* *
* Parameters: start - [IN] the segment start *
@@ -1274,8 +1234,6 @@ static int jsonpath_parse_dot_segment(const char *start, zbx_jsonpath_t *jsonpat
/******************************************************************************
* *
- * Function: jsonpath_parse_name_reference *
- * *
* Purpose: parse jsonpath name reference ~ *
* *
* Parameters: start - [IN] the segment start *
@@ -1300,8 +1258,6 @@ static int jsonpath_parse_name_reference(const char *start, zbx_jsonpath_t *json
/******************************************************************************
* *
- * Function: jsonpath_pointer_to_jp *
- * *
* Purpose: convert a pointer to an object/array/value in json data to *
* json parse structure *
* *
@@ -1328,8 +1284,6 @@ static int jsonpath_pointer_to_jp(const char *pnext, struct zbx_json_parse *jp)
/******************************************************************************
* *
- * Function: jsonpath_query_contents *
- * *
* Purpose: perform the rest of jsonpath query on json data *
* *
* Parameters: jp_root - [IN] the document root *
@@ -1365,8 +1319,6 @@ static int jsonpath_query_contents(const struct zbx_json_parse *jp_root, const c
/******************************************************************************
* *
- * Function: jsonpath_query_next_segment *
- * *
* Purpose: query next segment *
* *
* Parameters: jp_root - [IN] the document root *
@@ -1398,8 +1350,6 @@ static int jsonpath_query_next_segment(const struct zbx_json_parse *jp_root, con
/******************************************************************************
* *
- * Function: jsonpath_match_name *
- * *
* Purpose: match object value name against jsonpath segment name list *
* *
* Parameters: jp_root - [IN] the document root *
@@ -1439,8 +1389,6 @@ static int jsonpath_match_name(const struct zbx_json_parse *jp_root, const char
/******************************************************************************
* *
- * Function: jsonpath_extract_value *
- * *
* Purpose: extract value from json data by the specified path *
* *
* Parameters: jp - [IN] the parent object *
@@ -1487,8 +1435,6 @@ out:
/******************************************************************************
* *
- * Function: jsonpath_expression_to_str *
- * *
* Purpose: convert jsonpath expression to text format *
* *
* Parameters: expression - [IN] the jsonpath exprssion *
@@ -1578,8 +1524,6 @@ static char *jsonpath_expression_to_str(zbx_jsonpath_expression_t *expression)
/******************************************************************************
* *
- * Function: jsonpath_set_expression_error *
- * *
* Purpose: set jsonpath expression error message *
* *
* Parameters: expression - [IN] the jsonpath exprssion *
@@ -1604,8 +1548,6 @@ static void jsonpath_set_expression_error(zbx_jsonpath_expression_t *expression)
/******************************************************************************
* *
- * Function: jsonpath_variant_to_boolean *
- * *
* Purpose: convert variant value to 'boolean' (1, 0) *
* *
* Parameters: value - [IN/OUT] the value *
@@ -1644,8 +1586,6 @@ static void jsonpath_variant_to_boolean(zbx_variant_t *value)
/******************************************************************************
* *
- * Function: jsonpath_regexp_match *
- * *
* Purpose: match text against regular expression *
* *
* Parameters: text - [IN] the text to match *
@@ -1675,8 +1615,6 @@ static int jsonpath_regexp_match(const char *text, const char *pattern, double *
/******************************************************************************
* *
- * Function: jsonpath_match_expression *
- * *
* Purpose: match json array element/object value against jsonpath expression *
* *
* Parameters: jp_root - [IN] the document root *
@@ -1908,8 +1846,6 @@ out:
/******************************************************************************
* *
- * Function: jsonpath_query_object *
- * *
* Purpose: query object fields for jsonpath segment match *
* *
* Parameters: jp_root - [IN] the document root *
@@ -1958,8 +1894,6 @@ static int jsonpath_query_object(const struct zbx_json_parse *jp_root, const str
/******************************************************************************
* *
- * Function: jsonpath_match_index *
- * *
* Purpose: match array element against segment index list *
* *
* Parameters: jp_root - [IN] the document root *
@@ -2004,8 +1938,6 @@ static int jsonpath_match_index(const struct zbx_json_parse *jp_root, const char
/******************************************************************************
* *
- * Function: jsonpath_match_range *
- * *
* Purpose: match array element against segment index range *
* *
* Parameters: jp_root - [IN] the document root *
@@ -2046,8 +1978,6 @@ static int jsonpath_match_range(const struct zbx_json_parse *jp_root, const char
/******************************************************************************
* *
- * Function: jsonpath_query_array *
- * *
* Purpose: query array elements for jsonpath segment match *
* *
* Parameters: jp_root - [IN] the document root *
@@ -2108,8 +2038,6 @@ static int jsonpath_query_array(const struct zbx_json_parse *jp_root, const stru
/******************************************************************************
* *
- * Function: jsonpath_extract_element *
- * *
* Purpose: extract JSON element value from data *
* *
* Parameters: ptr - [IN] pointer to the element to extract *
@@ -2141,8 +2069,6 @@ static int jsonpath_extract_element(const char *ptr, char **element)
/******************************************************************************
* *
- * Function: jsonpath_extract_numeric_value *
- * *
* Purpose: extract numeric value from json data *
* *
* Parameters: ptr - [IN] pointer to the value to extract *
@@ -2168,8 +2094,6 @@ static int jsonpath_extract_numeric_value(const char *ptr, double *value)
/******************************************************************************
* *
- * Function: jsonpath_apply_function *
- * *
* Purpose: apply jsonpath function to the extracted object list *
* *
* Parameters: objects - [IN] the matched json elements (name, value) *
@@ -2324,8 +2248,6 @@ out:
/******************************************************************************
* *
- * Function: jsonpath_apply_functions *
- * *
* Purpose: apply jsonpath function to the extracted object list *
* *
* Parameters: jp_root - [IN] the document root *
@@ -2386,8 +2308,6 @@ static int jsonpath_apply_functions(const struct zbx_json_parse *jp_root, const
/******************************************************************************
* *
- * Function: jsonpath_format_query_result *
- * *
* Purpose: format query result, depending on jsonpath type *
* *
* Parameters: objects - [IN] the matched json elements (name, value) *
@@ -2442,8 +2362,6 @@ static int jsonpath_format_query_result(const zbx_vector_json_t *objects, zbx_js
/******************************************************************************
* *
- * Function: zbx_jsonpath_clear *
- * *
******************************************************************************/
void zbx_jsonpath_clear(zbx_jsonpath_t *jsonpath)
{
@@ -2457,8 +2375,6 @@ void zbx_jsonpath_clear(zbx_jsonpath_t *jsonpath)
/******************************************************************************
* *
- * Function: zbx_jsonpath_compile *
- * *
* Purpose: compile jsonpath to be used in queries *
* *
* Parameters: path - [IN] the path to parse *
@@ -2560,8 +2476,6 @@ int zbx_jsonpath_compile(const char *path, zbx_jsonpath_t *jsonpath)
/******************************************************************************
* *
- * Function: zbx_jsonpath_query *
- * *
* Purpose: perform jsonpath query on the specified json data *
* *
* Parameters: jp - [IN] the json data *