diff --git a/plugins/dynamic-security/json_help.c b/plugins/dynamic-security/json_help.c index 62d381e1..263db4da 100644 --- a/plugins/dynamic-security/json_help.c +++ b/plugins/dynamic-security/json_help.c @@ -91,22 +91,6 @@ int json_get_string(cJSON *json, const char *name, char **value, bool optional) } -/* Return a number as a number, or attempt to convert a string to a number, or a bool to a number */ -double json_get_as_number(const cJSON *json) -{ - char *endptr = NULL; - - if(cJSON_IsNumber(json)){ - return json->valuedouble; - }else if(cJSON_IsString(json)){ - return strtod(json->valuestring, &endptr); - }else if(cJSON_IsBool(json)){ - return cJSON_IsTrue(json); - }else{ - return 0.0; - } -} - cJSON *cJSON_AddIntToObject(cJSON * const object, const char * const name, int number) { char buf[30]; diff --git a/plugins/dynamic-security/json_help.h b/plugins/dynamic-security/json_help.h index 731b0a72..bfb77b86 100644 --- a/plugins/dynamic-security/json_help.h +++ b/plugins/dynamic-security/json_help.h @@ -22,7 +22,6 @@ Contributors: int json_get_bool(cJSON *json, const char *name, bool *value, bool optional, bool default_value); int json_get_int(cJSON *json, const char *name, int *value, bool optional, int default_value); int json_get_string(cJSON *json, const char *name, char **value, bool optional); -double json_get_as_number(const cJSON *json); cJSON *cJSON_AddIntToObject(cJSON * const object, const char * const name, int number); cJSON *cJSON_CreateInt(int num);