summaryrefslogtreecommitdiff
path: root/ext/json/json.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace zend_bool uses with boolNikita Popov2021-01-151-2/+2
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Remove Z_PARAM separate params where they don't make senseNikita Popov2021-01-141-1/+1
| | | | | | | | | Separation can only possibly make sense for array parameters (or something that can contain arrays, like zval parameters). It never makes sense to separate a bool. The deref parameters are also of dubious utility, but leaving them for now.
* Don't leak json error_code across requestsNikita Popov2020-10-221-1/+6
|
* Remove proto comments from C filesMax Semenik2020-07-061-14/+7
| | | | Closes GH-5758
* Constify char * arguments of APIstwosee2020-06-081-1/+1
| | | | Closes GH-5676.
* Generate method entries from stubs for a couple of extensionsMáté Kocsis2020-04-111-8/+1
| | | | Closes GH-5368
* Improve some ValueError messagesMáté Kocsis2020-04-061-2/+2
| | | | Closes GH-5340
* Generate functions entries from stubs for another set of extensionsMáté Kocsis2020-04-051-19/+5
| | | | Closes GH-5351
* Convert zend_parse_parameters_none() to fast ZPPMáté Kocsis2020-01-031-6/+2
| | | | I've done the conversion in those extensions where fast ZPP is predominant.
* Use RETURN_THROWS() after zend_throw_exception() in most of the extensionsMáté Kocsis2020-01-021-1/+1
|
* Use RETURN_THROWS() after zend_value_error()Máté Kocsis2019-12-311-2/+2
|
* Use RETURN_THROWS() during ZPP in most of the extensionsMáté Kocsis2019-12-311-2/+2
| | | | Except for some bigger ones: reflection, sodium, spl
* Convert warnings to ValueErrorGeorge Peter Banyard2019-12-081-4/+4
|
* Add arginfo stub for JsonSerializableChristoph M. Becker2019-10-051-5/+1
|
* Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | Closes GH-4732.
* Convert json functions arginfo to php stubsCraig Duncan2019-08-101-21/+1
| | | | Closes GH-4500
* Bump PHP_JSON_VERSION to PHP_VERSIONPeter Kokot2019-07-241-1/+0
| | | | Closes GH-4459
* Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
|
* Use int instead of long in protosGabriel Caruso2018-02-231-1/+1
|
* year++Xinchen Hui2018-01-021-1/+1
|
* Merge JSON_THROW_ON_ERRORAndrea Faulds2017-10-221-34/+63
|
* [ci skip] Remove CSV leftovers from json code - $Id$Jakub Zelenka2017-07-161-2/+0
|
* Introduce internal php_json_encode_ex to allow extensions setting depthJakub Zelenka2017-07-161-4/+8
|
* Add JSON_INVALID_UTF8_SUBSTITUTE and JSON_INVALID_UTF8_IGNOREJakub Zelenka2017-07-161-0/+4
| | | | | It implements request #65082 and adds options for replacing resp. ignoring invalid UTF-8 sequences for json_encode and json_decode.
* Avoid useless dereferences and separations during paramter passing.Dmitry Stogov2017-06-191-1/+1
|
* Allow JSON_OBJECT_AS_ARRAY option to actually have meaningSara Golemon2017-03-171-5/+8
| | | | | | | | | Options can only be passed if $assoc is passed, but passing assoc clobbers any attempt to pass JSON_OBJECT_AS_ARRAY as an option. Allow the option to occur in the options field by handling "null" as default/use-options.
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Use new param API in jsonSara Golemon2016-12-311-6/+13
|
* Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-11-221-2/+2
|\ | | | | | | | | * PHP-7.0: remove TSRMLS_*
| * remove TSRMLS_*Anatol Belski2016-11-211-2/+2
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Jakub Zelenka2016-11-201-1/+1
|\ \ | |/
| * Fix bug #73526 (php_json_encode depth issue)Jakub Zelenka2016-11-201-1/+1
| |
* | Introduce json encoder to fix globals related issuesJakub Zelenka2016-10-301-14/+25
| | | | | | | | | | | | 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.
* | Fix 73113 - Segfault with throwing JsonSerializableJulien Pauli2016-09-191-1/+4
| |
* | Add initial failure checking for json_encodeJakub Zelenka2016-08-291-3/+1
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Jakub Zelenka2016-08-141-0/+10
|\ \ | |/
| * Merge branch 'PHP-5.6' into PHP-7.0Jakub Zelenka2016-08-141-0/+10
| |\
| | * Fixed bug #72787 (json_decode reads out of bounds)Jakub Zelenka2016-08-141-0/+6
| | |
* | | Add return code from json API functionsJakub Zelenka2016-06-281-3/+8
| | | | | | | | | | | | It will allow fix few json bugs in a better way
* | | Use one place to define max length of doubleJakub Zelenka2016-06-261-8/+0
| | | | | | | | | | | | Introduce new constant PHP_DOUBLE_MAX_LENGTH for that purpose
* | | Replace json.precision with serialize_precisionJakub Zelenka2016-06-261-38/+1
| | |
* | | Add JSON_G(precision)Yasuo Ohgaki2016-06-261-1/+38
| | |
* | | Merge branch 'PHP-7.0'Xinchen Hui2016-04-221-1/+1
|\ \ \ | |/ /
| * | Fixed bug #72069 (Behavior \JsonSerializable different from json_encode)Xinchen Hui2016-04-221-1/+1
| | |
* | | Merge branch 'PHP-7.0'Nikita Popov2016-03-031-1/+1
|\ \ \ | |/ /
| * | Move semicolon into TSRMLS_CACHE_EXTERN/DEFINENikita Popov2016-03-031-1/+1
| | | | | | | | | | | | Also re bug #71575.
* | | json_encode: Escape U+2028 and U+2029 more often.Eddie Kohler2016-01-221-0/+1
|/ / | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ \ | |/ | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |