summaryrefslogtreecommitdiff
path: root/ext/json/json.c
Commit message (Collapse)AuthorAgeFilesLines
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* Merge branch 'PHP-5.4' into PHP-5.5Adam Harvey2012-12-111-3/+28
|\ | | | | | | | | * PHP-5.4: Alter php_json_decode_ex() to respect JSON_BIGINT_AS_STRING for bare numbers.
| * Alter php_json_decode_ex() to respect JSON_BIGINT_AS_STRING for bare numbers.Adam Harvey2012-12-111-3/+28
| | | | | | | | Fixes bug #63737 (json_decode does not properly decode with options parameter).
* | Merge branch 'PHP-5.4' into PHP-5.5Remi Collet2012-11-261-17/+22
|\ \ | |/ | | | | | | * PHP-5.4: Related bug #63588 fix length computation + optimize for speed
| * Related bug #63588 fix length computation + optimize for speedRemi Collet2012-11-261-17/+22
| | | | | | | | | | | | Following comment from Yoram "The patch looks fine, except of testing for true value of utf16 in each iteration." Also fix the length computation during check phase.
* | Merge branch 'PHP-5.4' into PHP-5.5Remi Collet2012-11-251-3/+29
|\ \ | |/ | | | | | | * PHP-5.4: Fixed bug #63588 Duplicate implementation of php_next_utf8_char
| * Fixed bug #63588 Duplicate implementation of php_next_utf8_charRemi Collet2012-11-251-3/+29
| | | | | | | | | | | | | | | | | | Json use an utf8 parser from a third party library, switch to our implementation of php_next_utf8_char. This also helps on solving #63520. All the unit tests succeed. Our implementation also seems a little faster. json.dsp need to be regenerated.
| * Revert JSON merges to 5.4Nikita Popov2012-07-011-54/+10
| | | | | | | | | | | | | | | | This reverts the following merge commits (-m 1): 405ebfcd182a39f0960ff7d7055d49053d3e0316 d372b33c9b941be9a795bf3705bd22dc5f6092c3 36fa17a5fae84ab332366a202f0a709279a2466a
* | Fix test failed due to new feature introduced in 45d596eaXinchen Hui2012-07-291-1/+1
| |
* | Add optional depth parameter to json_encode #62369Florian Anderiasch2012-07-241-1/+9
|/
* fix bug #61359: json_encode() calls too many reallocsStanislav Malyshev2012-06-301-9/+12
|
* Merge branch 'PHP-5.3' into PHP-5.4Nikita Popov2012-06-281-10/+19
|\ | | | | | | | | * PHP-5.3: Add json_last_error_msg() function
| * Add json_last_error_msg() functionNikita Popov2012-06-281-10/+19
| | | | | | | | | | This replaces json_last_error(true) and is consistent with other custom error handling functions.
* | Merge branch 'PHP-5.3' into PHP-5.4Nikita Popov2012-06-271-9/+33
|\ \ | |/ | | | | | | | | | | | | | | * PHP-5.3: Improve JSON error handling Conflicts: ext/json/tests/bug54058.phpt ext/json/tests/bug61537.phpt
| * Improve JSON error handlingNikita Popov2012-06-271-8/+33
| | | | | | | | | | | | | | | | | | json_encode() no longer throws warnings. Instead only the error code for json_last_error() is set. As it is hard to debug the error from just an error code an optional $as_string parameter was added to json_last_error(), which returns an error message instead of an error code.
* | Merge branch 'PHP-5.3' into PHP-5.4Nikita Popov2012-06-231-7/+18
|\ \ | |/ | | | | | | | | | | | | | | * PHP-5.3: Improve json_encode error handling - BFN Conflicts: ext/json/json.c
| * Improve json_encode error handlingNikita Popov2012-06-231-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Fix bug #61537 (json_encode() incorrectly truncates/discards information) andAdam Harvey2012-04-111-4/+7
| | | | | | | | remove a test case that's now mooted by this fix.
* | - Fixed bug #61978 (Object recursion not detected for classes that implement ↵Felipe Pena2012-05-081-0/+13
| | | | | | | | JsonSerializable)
* | Revert "Fix bug #61537 (json_encode() incorrectly truncates/discards ↵Stanislav Malyshev2012-05-011-7/+4
| | | | | | | | | | | | | | | | information) and" This reverts commit cb2a1c71c96d7c9b2ee03d77beae0c8e0d385f1b. The fix is not correct, not fixed after discussion on github. Please fix the issues and reapply the patch
* | Fix bug #61537 (json_encode() incorrectly truncates/discards information) andAdam Harvey2012-04-111-4/+7
| | | | | | | | remove a test case that's now mooted by this fix.
* | Merge branch 'PHP-5.3' into PHP-5.4David Soria Parra2012-03-201-1/+2
|\ \ | |/ | | | | | | * PHP-5.3: Adding Braces in json.c to conform with coding standards
| * Adding Braces in json.c to conform with coding standardsMatt Nowack2012-03-201-1/+2
| |
| * - Year++Felipe Pena2012-01-011-1/+1
| |
| * Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects ↵Ilia Alshanetsky2011-10-171-1/+1
| | | | | | | | with numeric string properties)
| * - Make usage of new PHP_FE_END macroFelipe Pena2011-07-251-1/+1
| |
| * Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()).Ilia Alshanetsky2011-06-011-0/+2
| |
| * Fix Bug #54058, invalid utf-8 doesn't set json_encode() in all casesScott MacVicar2011-02-211-1/+2
| |
| * - Year++Felipe Pena2011-01-011-1/+1
| |
| * Fix English in the error message emitted when json_decode() is called withAdam Harvey2010-09-141-1/+1
| | | | | | | | | | depth <= 0.
| * Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they ↵Scott MacVicar2010-07-061-0/+1
| | | | | | | | fail to decode.
| * Added support for JSON_NUMERIC_CHECK option in json_encode() that converts Ilia Alshanetsky2010-05-201-11/+27
| | | | | | | | | | | | numeric strings to integers.
| * - Fixed bug #51590 (JSON_ERROR_UTF8 is undefined)Felipe Pena2010-04-181-0/+1
| |
* | - Year++Felipe Pena2012-01-011-1/+1
| |
* | Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects ↵Ilia Alshanetsky2011-10-171-1/+1
| | | | | | | | with numeric string properties)
* | Add unescaped Unicode encoding to json_encode(). Closes bug #53946. Patch by ↵Gwynne Raskind2011-08-291-10/+15
| | | | | | | | Irker and Gwynne.
* | - Added missing PHP_FE_END/ZEND_FE_ENDFelipe Pena2011-08-061-1/+1
| |
* | - Make usage of new PHP_FE_END macroFelipe Pena2011-07-251-1/+1
| |
* | Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()).Ilia Alshanetsky2011-06-011-0/+2
| |
* | fix method name in JsonSerializable exception messagePeter Cowburn2011-04-301-1/+1
| |
* | Fix Bug #54058, invalid utf-8 doesn't set json_encode() in all casesScott MacVicar2011-02-211-1/+2
| |
* | - Year++Felipe Pena2011-01-011-1/+1
| |
* | Implement FR #44331 (Formatting option for json_encode). Bikeshedding about theAdam Harvey2010-09-161-1/+46
| | | | | | | | | | | | exact form of the JSON pretty printing and brace handling will only be accepted in the form of patches. ;)
* | Rebalance the folds in json.c.Adam Harvey2010-09-161-1/+3
| |
* | Implemented FR #49366 (Make slash escaping optional in json_encode()).Adam Harvey2010-09-161-1/+6
| |
* | Fix English in the error message emitted when json_decode() is called withAdam Harvey2010-09-141-1/+1
| | | | | | | | | | depth <= 0.
* | Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they ↵Scott MacVicar2010-07-061-0/+1
| | | | | | | | fail to decode.
* | Add JSON_BIGINT_AS_STRING for json_decode() to parse large numbersSara Golemon2010-05-211-4/+17
| | | | | | | | | | as strings rather than casting to double and loosing precision.
* | Added support for JSON_NUMERIC_CHECK option in json_encode() that converts Ilia Alshanetsky2010-05-201-11/+27
| | | | | | | | | | | | numeric strings to integers.
* | Rename JSON_Serializable to JsonSerializable per ML discussionSara Golemon2010-05-121-4/+3
| |