summaryrefslogtreecommitdiff
path: root/ext/json/php_json.h
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2014-11-16 15:13:15 +0000
committerJakub Zelenka <bukka@php.net>2014-11-16 15:13:15 +0000
commit432b73fdee8ae464d1a490a37faa774b850a1534 (patch)
tree5190b2824deeafa042024dcb204dcd618ac26a4f /ext/json/php_json.h
parentd07bf913281058a595e0194076314cd76c0277b6 (diff)
downloadphp-git-432b73fdee8ae464d1a490a37faa774b850a1534.tar.gz
Add error codes to php_json.h
Diffstat (limited to 'ext/json/php_json.h')
-rw-r--r--ext/json/php_json.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/json/php_json.h b/ext/json/php_json.h
index 5b2dc127dd..da6eb12cbd 100644
--- a/ext/json/php_json.h
+++ b/ext/json/php_json.h
@@ -53,6 +53,19 @@ PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_
PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, size_t str_len, zend_long options, zend_long depth TSRMLS_DC);
extern PHP_JSON_API zend_class_entry *php_json_serializable_ce;
+/* error codes */
+typedef enum {
+ PHP_JSON_ERROR_NONE = 0,
+ PHP_JSON_ERROR_DEPTH,
+ PHP_JSON_ERROR_STATE_MISMATCH,
+ PHP_JSON_ERROR_CTRL_CHAR,
+ PHP_JSON_ERROR_SYNTAX,
+ PHP_JSON_ERROR_UTF8,
+ PHP_JSON_ERROR_RECURSION,
+ PHP_JSON_ERROR_INF_OR_NAN,
+ PHP_JSON_ERROR_UNSUPPORTED_TYPE,
+ PHP_JSON_ERROR_UTF16
+} php_json_error_code;
/* json_encode() options */
#define PHP_JSON_HEX_TAG (1<<0)