summaryrefslogtreecommitdiff
path: root/ext/json/json_encoder.c
Commit message (Collapse)AuthorAgeFilesLines
* php_json_escape_string() optimizationDmitry Stogov2018-06-131-35/+60
|
* Removed useless zval_ptr_dtor()Dmitry Stogov2018-05-291-1/+1
|
* Bit test optimizationDmitry Stogov2018-05-081-1/+1
|
* Bit check micro-optimizationDmitry Stogov2018-04-281-1/+1
|
* year++Xinchen Hui2018-01-021-1/+1
|
* Merge branch 'PHP-7.2'Jakub Zelenka2017-10-151-2/+7
|\
| * Fix bug #68567 (JSON_PARTIAL_OUTPUT_ON_ERROR can result in JSON with null key)Jakub Zelenka2017-10-151-2/+7
| |
* | Refactored recursion pretectionDmitry Stogov2017-10-061-16/+16
|/
* [ci skip] Remove CSV leftovers from json code - $Id$Jakub Zelenka2017-07-161-2/+0
|
* Add JSON_INVALID_UTF8_SUBSTITUTE and JSON_INVALID_UTF8_IGNOREJakub Zelenka2017-07-161-8/+22
| | | | | It implements request #65082 and adds options for replacing resp. ignoring invalid UTF-8 sequences for json_encode and json_decode.
* Optimization for fast path.Dmitry Stogov2017-06-191-80/+83
|
* Fixed performance degradaton introduced in f6ac96bDmitry Stogov2017-06-131-17/+23
|
* Improve and simplify UTF-8 validation in JSONJakub Zelenka2017-06-111-50/+16
|
* Improved UTF-8 validation in JSONDmitry Stogov2017-05-251-27/+10
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* json_encode(): Detect recursion earlierNikita Popov2016-11-191-20/+15
| | | | | | | json_encode() used a peculiar way of apply-count management, whereby the apply-count was not incremented for the outermost object/array, so that recursion was only detected after two levels.
* Introduce json encoder to fix globals related issuesJakub Zelenka2016-10-301-32/+37
| | | | | | It fixes bugs #66025 and #73254 by replacing globals with a passed structure holding depth and error code. In addition it fixes #72069 in a more generic way.
* Introduced HT_IS_PACKED() and HT_IS_WITHOUT_HOLES() macros. (Benjamin Coutu)Dmitry Stogov2016-10-191-0/+4
|
* Merge branch 'PHP-7.0' into PHP-7.1Julien Pauli2016-09-191-1/+3
|\ | | | | | | | | | | | | | | * PHP-7.0: Do not wrap user exception in case of custom JSON serialization Conflicts: ext/json/json_encoder.c
| * Merge branch 'PHP-5.6' into PHP-7.0Julien Pauli2016-09-191-1/+3
| | | | | | | | | | | | | | | | * PHP-5.6: Do not wrap user exception in case of custom JSON serialization Conflicts: ext/json/json.c
* | Fix recursion and protection in the failed JSON encodingJakub Zelenka2016-08-291-11/+20
| |
* | Add initial failure checking for json_encodeJakub Zelenka2016-08-291-38/+54
| |
* | Use one place to define max length of doubleJakub Zelenka2016-06-261-10/+2
| | | | | | | | Introduce new constant PHP_DOUBLE_MAX_LENGTH for that purpose
* | Replace json.precision with serialize_precisionJakub Zelenka2016-06-261-1/+1
| |
* | Add castYasuo Ohgaki2016-06-261-1/+1
| |
* | Simply use ndigit for flag for zend_dtoa modeYasuo Ohgaki2016-06-261-5/+2
| |
* | Add JSON_G(precision)Yasuo Ohgaki2016-06-261-2/+2
| |
* | Initial patch for 0 mode float conversion. The magic number is better to be ↵Yasuo Ohgaki2016-06-261-1/+5
| | | | | | | | improved. Any suggestion where to define it?
* | Use empty keys instead of _empty_ in json decodingJakub Zelenka2016-06-201-1/+1
| |
* | Merge branch 'PHP-7.0'Xinchen Hui2016-05-061-45/+38
|\ \ | |/ | | | | | | * PHP-7.0: Revert "Fixed bug #72170 (JsonSerializable may inc apply count without dec it)"
| * Revert "Fixed bug #72170 (JsonSerializable may inc apply count without dec it)"Xinchen Hui2016-05-061-45/+38
| | | | | | | | This reverts commit 459a7cc209da130256d66c1f896199540f4dadbc.
* | Merge branch 'PHP-7.0'Xinchen Hui2016-05-061-38/+45
|\ \ | |/ | | | | | | * PHP-7.0: Fixed bug #72170 (JsonSerializable may inc apply count without dec it)
| * Fixed bug #72170 (JsonSerializable may inc apply count without dec it)Xinchen Hui2016-05-061-38/+45
| | | | | | | | I don't want use zend_try here, but seems I have no choice :<
* | Merge branch 'PHP-7.0'Xinchen Hui2016-04-221-0/+4
|\ \ | |/
| * Fixed bug #72069 (Behavior \JsonSerializable different from json_encode)Xinchen Hui2016-04-221-0/+4
| |
* | json_encode: Escape U+2028 and U+2029 more often.Eddie Kohler2016-01-221-1/+10
|/ | | | | | | | | These characters are illegal in Javascript, so leaving them unescaped is risky. The default encoder ($flags = 0) is fine, but the encoder with JSON_UNESCAPED_UNICODE flag is not. In case anyone wants the ability to leave these characters unescaped, provide JSON_UNESCAPED_LINE_TERMINATORS.
* Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
|
* Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-5/+5
| | | | semantick changes).
* Use Z_ARRVAL_P since we already know it's an arrayXinchen Hui2015-05-061-3/+3
|
* fix datatype mismatchesAnatol Belski2015-03-251-1/+1
|
* Improved php_json_escape_string()Dmitry Stogov2015-03-111-98/+103
|
* Merge branch 'PHP-5.6'Jakub Zelenka2015-02-221-17/+24
| | | | The fix for master is a bit different (it's fixed in encoder)
* fix json globalsMichael Wallner2015-02-091-2/+0
|
* size_t vs intAnatol Belski2015-02-091-1/+1
|
* Merge branch 'master' into jsondJakub Zelenka2015-02-081-1/+1
| | | | | Conflicts: ext/json/json.c
* Give me creditJakub Zelenka2015-02-021-0/+1
|
* Merge branch 'master' into jsondJakub Zelenka2015-01-251-1/+1
| | | | | | Conflicts: ext/json/JSON_parser.c ext/json/json.c
* Increase PHP_JSON_DOUBLE_MAX_LENGTH for fractional partJakub Zelenka2015-01-181-2/+2
| | | | | | This is probably not necessary as such number is not realistic. It's just to be consistent with jsond extension.
* Porting implementation of RFC json_preserve_fractional_partJuan Basso2015-01-121-3/+8
|
* Refactore json double encoding to use php_gcvtJakub Zelenka2015-01-111-23/+25
|