diff options
author | Jakub Zelenka <bukka@php.net> | 2017-07-16 12:35:24 +0100 |
---|---|---|
committer | Jakub Zelenka <bukka@php.net> | 2017-07-16 12:35:24 +0100 |
commit | 0d0f7cde8c321ae841ba0f60f4377b72f98db637 (patch) | |
tree | 9382ab16cf35c723187e4894b2c0bb38d490abb4 /ext/json/php_json_scanner.h | |
parent | f6a44916623f9d8dc24d35d52f2998700f0567a6 (diff) | |
download | php-git-0d0f7cde8c321ae841ba0f60f4377b72f98db637.tar.gz |
Add JSON_INVALID_UTF8_SUBSTITUTE and JSON_INVALID_UTF8_IGNORE
It implements request #65082 and adds options for replacing resp.
ignoring invalid UTF-8 sequences for json_encode and json_decode.
Diffstat (limited to 'ext/json/php_json_scanner.h')
-rw-r--r-- | ext/json/php_json_scanner.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/json/php_json_scanner.h b/ext/json/php_json_scanner.h index f13483d2b7..28cef7ee87 100644 --- a/ext/json/php_json_scanner.h +++ b/ext/json/php_json_scanner.h @@ -34,9 +34,11 @@ typedef struct _php_json_scanner { php_json_ctype *pstr; /* string pointer for escapes conversion */ zval value; /* value */ int str_esc; /* number of extra characters for escaping */ - int state; /* condition state */ - int options; /* options */ + int state; /* condition state */ + int options; /* options */ php_json_error_code errcode; /* error type if there is an error */ + int utf8_invalid; /* whether utf8 is invalid */ + int utf8_invalid_count; /* number of extra character for invalid utf8 */ } php_json_scanner; |