Nikita Popov
84fe2cc890
Improve json_encode error handling
...
json_encode() now returns bool(false) for all possible errors, throws the
respective warning and also sets the respective json_last_error() error
code. Three new error codes have been added:
* JSON_ERROR_RECURSION
* JSON_ERROR_INF_OR_NAN
* JSON_ERROR_UNSUPPORTED_TYPE
To get a partial JSON output instead of bool(false) the option
JSON_PARTIAL_OUTPUT_ON_ERROR can be specified. In this case the invalid
segments will be replaced either by null (for recursion, unsupported type
and invalid JSON) or 0 (for Inf and NaN).
The warning for invalid UTF-8 stays intact and is thrown also with
display_errors = On. If this behavior is undesired this can be remedied
later.
2012-06-23 20:51:52 +02:00
..
2012-01-01 13:15:04 +00:00
2012-01-01 13:15:04 +00:00
2012-04-28 11:42:42 +02:00
2012-05-25 00:22:25 +02:00
2012-01-01 13:15:04 +00:00
2012-05-25 10:44:59 +02:00
2012-04-10 12:33:11 +02:00
2012-03-20 17:53:47 +01:00
2012-05-01 15:43:31 -07:00
2012-03-20 17:53:47 +01:00
2012-01-01 13:15:04 +00:00
2012-06-03 15:23:07 -03:00
2012-05-29 17:38:30 +02:00
2012-04-30 10:25:54 +02:00
2012-01-01 13:15:04 +00:00
2012-04-04 18:39:24 +02:00
2012-01-01 13:15:04 +00:00
2012-05-21 12:31:16 +02:00
2012-01-01 13:15:04 +00:00
2012-03-20 17:53:47 +01:00
2012-01-01 13:15:04 +00:00
2012-03-29 18:28:01 +03:00
2012-06-06 12:10:00 +02:00
2012-06-23 20:51:52 +02:00
2012-04-16 15:25:20 +02:00
2012-05-19 16:33:36 +01:00
2012-04-10 11:47:18 +02:00
2012-01-01 13:15:04 +00:00
2012-01-01 13:15:04 +00:00
2012-01-01 13:15:04 +00:00
2012-05-16 14:28:55 +02:00
2012-05-16 14:28:55 +02:00
2012-03-30 16:12:25 -07:00
2012-06-22 17:32:46 +02:00
2012-04-24 14:05:35 +02:00
2012-03-29 08:46:04 +01:00
2012-02-06 18:18:53 +00:00
2012-04-19 12:47:09 +02:00
2012-01-01 13:15:04 +00:00
2012-02-05 09:58:50 +00:00
2012-06-22 17:32:46 +02:00
2012-01-01 13:15:04 +00:00
2012-03-14 20:20:33 +00:00
2012-03-08 08:52:28 +00:00
2012-06-22 12:48:39 +02:00
2012-03-29 20:04:15 +09:00
2012-06-20 19:46:32 +02:00
2012-06-10 17:07:49 +04:00
2012-01-01 13:15:04 +00:00
2012-03-21 09:13:06 -07:00
2012-06-22 17:32:46 +02:00
2012-06-23 15:10:47 -03:00
2012-06-22 17:32:46 +02:00
2012-01-01 13:15:04 +00:00
2012-03-20 17:53:47 +01:00
2012-03-20 17:53:47 +01:00
2012-01-01 13:15:04 +00:00
2012-05-15 11:05:20 +01:00
2012-04-10 13:58:15 +02:00
2012-06-19 18:32:44 +02:00
2012-01-15 00:07:26 +00:00
2012-06-22 12:48:39 +02:00
2012-06-22 17:32:46 +02:00
2012-01-01 13:15:04 +00:00
2012-03-20 17:53:47 +01:00
2012-01-01 13:15:04 +00:00
2012-01-01 13:15:04 +00:00
2012-05-21 12:51:24 +02:00
2012-01-01 13:15:04 +00:00
2012-01-01 13:15:04 +00:00
2012-01-01 13:15:04 +00:00
2012-02-25 12:10:41 +00:00
2012-03-03 12:46:17 +00:00
2012-05-18 19:23:29 -03:00
2012-01-01 13:15:04 +00:00
2012-06-19 17:15:56 +02:00
2012-06-19 14:08:34 +02:00
2010-08-06 22:19:47 +00:00