1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

Extract json parser functions from class

Signed-off-by: Michael Okoko <okokomichaels@outlook.com>
This commit is contained in:
Michael Okoko
2021-07-23 08:57:41 +01:00
committed by Sergei Petrunia
parent 6bc2df5fa4
commit fb2edab3eb
3 changed files with 95 additions and 84 deletions

View File

@@ -1868,7 +1868,7 @@ int json_path_compare(const json_path_t *a, const json_path_t *b,
}
enum json_types smart_read_value(json_engine_t *je,
enum json_types json_smart_read_value(json_engine_t *je,
const char **value, int *value_len)
{
if (json_read_value(je))
@@ -1909,7 +1909,7 @@ enum json_types json_type(const char *js, const char *js_end,
json_scan_start(&je, &my_charset_utf8mb4_bin,(const uchar *) js,
(const uchar *) js_end);
return smart_read_value(&je, value, value_len);
return json_smart_read_value(&je, value, value_len);
}
@@ -1933,7 +1933,7 @@ enum json_types json_get_array_item(const char *js, const char *js_end,
{
case JST_VALUE:
if (c_item == n_item)
return smart_read_value(&je, value, value_len);
return json_smart_read_value(&je, value, value_len);
if (json_skip_key(&je))
goto err_return;
@@ -1997,7 +1997,7 @@ enum json_types json_get_object_key(const char *js, const char *js_end,
json_string_set_str(&key_name, (const uchar *) key,
(const uchar *) key_end);
if (json_key_matches(&je, &key_name))
return smart_read_value(&je, value, value_len);
return json_smart_read_value(&je, value, value_len);
if (json_skip_key(&je))
goto err_return;