summaryrefslogtreecommitdiff
path: root/json_tokener.h
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2020-04-18 02:02:06 +0000
committerEric Haszlakiewicz <erh+git@nimenees.com>2020-04-18 02:02:06 +0000
commit5cc11289b4e7c1f74e1528278185ba91a8d8f44d (patch)
tree0ab69852b5fd71cf15ce8575267ee3375af20fff /json_tokener.h
parent4dc0f1718e318003531545d58cd6fe457b14e859 (diff)
downloadjson-c-5cc11289b4e7c1f74e1528278185ba91a8d8f44d.tar.gz
Make json_tokener_validate_utf8() internal to json_tokener.c, and improve the docs a bit.
Diffstat (limited to 'json_tokener.h')
-rw-r--r--json_tokener.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/json_tokener.h b/json_tokener.h
index 09f21f4..407e937 100644
--- a/json_tokener.h
+++ b/json_tokener.h
@@ -139,9 +139,10 @@ typedef struct json_tokener json_tokener;
#define JSON_TOKENER_STRICT 0x01
/**
- * Allow json_tokener_parse_ex() validate utf-8 char.
- * The json_tokener_validate_utf8() validate one utf8 char
- * after get one char, then begin to parse it.
+ * Cause json_tokener_parse_ex() to validate that input is UTF8.
+ * If this flag is specified and validation fails, then
+ * json_tokener_get_error(tok) will return
+ * json_tokener_error_parse_utf8_string
*
* This flag is not set by default.
*
@@ -177,11 +178,6 @@ JSON_EXPORT struct json_object *json_tokener_parse_verbose(const char *str,
enum json_tokener_error *error);
/**
- * validete the utf-8 string in strict model.
- * if not utf-8 format, return err.
- */
-json_bool json_tokener_validate_utf8(const char c, unsigned int *nBytes);
-/**
* Set flags that control how parsing will be done.
*/
JSON_EXPORT void json_tokener_set_flags(struct json_tokener *tok, int flags);