Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | Improve JSON error handling | Nikita Popov | 2012-06-27 | 1 | -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.4 | Nikita Popov | 2012-06-23 | 1 | -7/+18 | |
|\ \ | |/ | | | | | | | | | | | | | | | * PHP-5.3: Improve json_encode error handling - BFN Conflicts: ext/json/json.c | |||||
| * | Improve json_encode error handling | Nikita Popov | 2012-06-23 | 1 | -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) and | Adam Harvey | 2012-04-11 | 1 | -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 Pena | 2012-05-08 | 1 | -0/+13 | |
| | | | | | | | | JsonSerializable) | |||||
* | | Revert "Fix bug #61537 (json_encode() incorrectly truncates/discards ↵ | Stanislav Malyshev | 2012-05-01 | 1 | -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) and | Adam Harvey | 2012-04-11 | 1 | -4/+7 | |
| | | | | | | | | remove a test case that's now mooted by this fix. | |||||
* | | Merge branch 'PHP-5.3' into PHP-5.4 | David Soria Parra | 2012-03-20 | 1 | -1/+2 | |
|\ \ | |/ | | | | | | | * PHP-5.3: Adding Braces in json.c to conform with coding standards | |||||
| * | Adding Braces in json.c to conform with coding standards | Matt Nowack | 2012-03-20 | 1 | -1/+2 | |
| | | ||||||
| * | - Year++ | Felipe Pena | 2012-01-01 | 1 | -1/+1 | |
| | | ||||||
| * | Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects ↵ | Ilia Alshanetsky | 2011-10-17 | 1 | -1/+1 | |
| | | | | | | | | with numeric string properties) | |||||
| * | - Make usage of new PHP_FE_END macro | Felipe Pena | 2011-07-25 | 1 | -1/+1 | |
| | | ||||||
| * | Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()). | Ilia Alshanetsky | 2011-06-01 | 1 | -0/+2 | |
| | | ||||||
| * | Fix Bug #54058, invalid utf-8 doesn't set json_encode() in all cases | Scott MacVicar | 2011-02-21 | 1 | -1/+2 | |
| | | ||||||
| * | - Year++ | Felipe Pena | 2011-01-01 | 1 | -1/+1 | |
| | | ||||||
| * | Fix English in the error message emitted when json_decode() is called with | Adam Harvey | 2010-09-14 | 1 | -1/+1 | |
| | | | | | | | | | | depth <= 0. | |||||
| * | Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they ↵ | Scott MacVicar | 2010-07-06 | 1 | -0/+1 | |
| | | | | | | | | fail to decode. | |||||
| * | Added support for JSON_NUMERIC_CHECK option in json_encode() that converts | Ilia Alshanetsky | 2010-05-20 | 1 | -11/+27 | |
| | | | | | | | | | | | | numeric strings to integers. | |||||
| * | - Fixed bug #51590 (JSON_ERROR_UTF8 is undefined) | Felipe Pena | 2010-04-18 | 1 | -0/+1 | |
| | | ||||||
* | | - Year++ | Felipe Pena | 2012-01-01 | 1 | -1/+1 | |
| | | ||||||
* | | Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects ↵ | Ilia Alshanetsky | 2011-10-17 | 1 | -1/+1 | |
| | | | | | | | | with numeric string properties) | |||||
* | | Add unescaped Unicode encoding to json_encode(). Closes bug #53946. Patch by ↵ | Gwynne Raskind | 2011-08-29 | 1 | -10/+15 | |
| | | | | | | | | Irker and Gwynne. | |||||
* | | - Added missing PHP_FE_END/ZEND_FE_END | Felipe Pena | 2011-08-06 | 1 | -1/+1 | |
| | | ||||||
* | | - Make usage of new PHP_FE_END macro | Felipe Pena | 2011-07-25 | 1 | -1/+1 | |
| | | ||||||
* | | Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()). | Ilia Alshanetsky | 2011-06-01 | 1 | -0/+2 | |
| | | ||||||
* | | fix method name in JsonSerializable exception message | Peter Cowburn | 2011-04-30 | 1 | -1/+1 | |
| | | ||||||
* | | Fix Bug #54058, invalid utf-8 doesn't set json_encode() in all cases | Scott MacVicar | 2011-02-21 | 1 | -1/+2 | |
| | | ||||||
* | | - Year++ | Felipe Pena | 2011-01-01 | 1 | -1/+1 | |
| | | ||||||
* | | Implement FR #44331 (Formatting option for json_encode). Bikeshedding about the | Adam Harvey | 2010-09-16 | 1 | -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 Harvey | 2010-09-16 | 1 | -1/+3 | |
| | | ||||||
* | | Implemented FR #49366 (Make slash escaping optional in json_encode()). | Adam Harvey | 2010-09-16 | 1 | -1/+6 | |
| | | ||||||
* | | Fix English in the error message emitted when json_decode() is called with | Adam Harvey | 2010-09-14 | 1 | -1/+1 | |
| | | | | | | | | | | depth <= 0. | |||||
* | | Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they ↵ | Scott MacVicar | 2010-07-06 | 1 | -0/+1 | |
| | | | | | | | | fail to decode. | |||||
* | | Add JSON_BIGINT_AS_STRING for json_decode() to parse large numbers | Sara Golemon | 2010-05-21 | 1 | -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 Alshanetsky | 2010-05-20 | 1 | -11/+27 | |
| | | | | | | | | | | | | numeric strings to integers. | |||||
* | | Rename JSON_Serializable to JsonSerializable per ML discussion | Sara Golemon | 2010-05-12 | 1 | -4/+3 | |
| | | ||||||
* | | Well we do need zend_throw_exception_ex ;-) | Kalle Sommer Nielsen | 2010-05-06 | 1 | -0/+1 | |
| | | ||||||
* | | Add JSON_Serializable interface | Sara Golemon | 2010-05-05 | 1 | -1/+57 | |
| | | | | | | | | | | | | | | | | Objects implementing JSON_Serializable will have their ->jsonSerialize() method called Similar to serialize() and __sleep() | |||||
* | | - Fixed bug #51590 (JSON_ERROR_UTF8 is undefined) | Felipe Pena | 2010-04-18 | 1 | -0/+1 | |
| | | ||||||
* | | Remove main/php3_compat.h, for that a few references to `function_entry` have | Johannes Schlüter | 2010-03-30 | 1 | -1/+1 | |
|/ | | | | | to be replaced by `zend_function_entry`. | |||||
* | sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php | Sebastian Bergmann | 2010-01-03 | 1 | -1/+1 | |
| | ||||||
* | MFH: Add error constant when json_encode detects an invalid UTF-8 sequence. | Scott MacVicar | 2009-07-27 | 1 | -0/+2 | |
| | ||||||
* | fix json shared build on Windows | Stanislav Malyshev | 2009-06-30 | 1 | -2/+2 | |
| | ||||||
* | - MFH: Fixed memleak when depth arg is less than zero | Felipe Pena | 2009-06-24 | 1 | -0/+1 | |
| | ||||||
* | MFH: no dots in errors | Jani Taskinen | 2009-05-31 | 1 | -3/+3 | |
| | ||||||
* | Expose encode/decode API. | Andrei Zmievski | 2009-05-31 | 1 | -43/+50 | |
| | ||||||
* | MFH: Fix arginfo | Kalle Sommer Nielsen | 2009-05-15 | 1 | -0/+1 | |
| | ||||||
* | MFH Allow a custom recursion depth to be specified for json_decode() | Scott MacVicar | 2009-05-14 | 1 | -4/+4 | |
| | ||||||
* | MFH Replace magic values with a define for json encoding, makes reading it a ↵ | Scott MacVicar | 2009-03-17 | 1 | -7/+10 | |
| | | | | bit easier | |||||
* | MFH Add PHP_JSON_FORCE_OBJECT for forcing an object output of an array | Scott MacVicar | 2009-03-17 | 1 | -1/+3 | |
| |