summaryrefslogtreecommitdiff
path: root/ext/json/JSON_parser.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert JSON changes to PHP 5.3Nikita Popov2012-07-011-4/+1
| | | | | | | | | | This reverts the following commits: 974324676b2436f159f42d9241c569f813471684 4662151ea7d7b6920d115cf2a2d6e9d4232727a3 84fe2cc890e49f40bac7c3ba74b3cfc6dc4cef2f This does not revert the JSON changes released in PHP 5.3.14.
* Improve json_encode error handlingNikita Popov2012-06-231-1/+4
| | | | | | | | | | | | | | | | | | | 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.
* MFH: Add error constant when json_encode detects an invalid UTF-8 sequence.Scott MacVicar2009-07-271-0/+1
|
* MFH Allow a custom recursion depth to be specified for json_decode()Scott MacVicar2009-05-141-3/+3
|
* MFH Add json_last_error() for getting a bit of information about what failed ↵Scott MacVicar2008-12-191-1/+9
| | | | | | | during a decode, also fixes a segfault when we have [1} [DOC]
* Update the JSON parser with that on json.org, biggest change here is code ↵Scott MacVicar2008-12-171-2/+20
| | | | | | | | | readability. Less magic numbers in the state table. Add missing reflection information to json_encode() Fixes bug #45791 with 0e0 not being supported as a value Error values are stored when encountered during parsing
* Fixed compiler warnings and enable Json by default.Ilia Alshanetsky2006-07-191-2/+0
|
* This commit was manufactured by cvs2svn to create branch 'PHP_5_2'.SVN Migration2006-05-051-0/+8