History log of /php-src/ext/json/json.c (Results 1 – 25 of 232)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 53aa53f4 24-Aug-2023 Jakub Zelenka

Introduce Zend guard recursion protection

This PR introduces a new way of recursion protection in JSON, var_dump
and friends. It fixes issue in master for __debugInfo and also improves

Introduce Zend guard recursion protection

This PR introduces a new way of recursion protection in JSON, var_dump
and friends. It fixes issue in master for __debugInfo and also improves
perf for jsonSerializable in some cases. More info can be found in
GH-10020.

Closes GH-11812

show more ...


# e8a836eb 10-Apr-2023 Jakub Zelenka

Expose JSON internal function to escape string


# 2e8699f6 08-Oct-2022 Juan Morales

RFC - json_validate() (#9399)

* Add `json_validate(string $json, int $depth = 512, int $flags = 0): bool` from https://wiki.php.net/rfc/json_validate
* In json_validate, use a different

RFC - json_validate() (#9399)

* Add `json_validate(string $json, int $depth = 512, int $flags = 0): bool` from https://wiki.php.net/rfc/json_validate
* In json_validate, use a different set of C no-op functions for creating/updating
arrays/objects when validating while reusing the unmodified parser/scanner code
* Forbid unsupported flags in json_validate()
* Remove test of passing NULL as parameter (normal behavior of https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg for internal functions)

Co-authored-by: jcm <juan.carlos.morales@tradebyte.com>

show more ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# 4df3dd76 08-Jul-2022 Arnaud Le Blanc

Reduce memory allocated by var_export, json_encode, serialize, and other (#8902)

smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend

Reduce memory allocated by var_export, json_encode, serialize, and other (#8902)

smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend to return the over-allocated string directly. This results in unnecessary memory usage, especially for small strings.

The overhead can be up to 231 bytes for strings smaller than that, and 4095 for other strings. This can be avoided for strings smaller than `4096 - zend_string header size - 1` by reallocating the string.

This change introduces `smart_str_trim_to_size()`, and calls it in `smart_str_extract()`. Functions that use `smart_str` are updated to use `smart_str_extract()`.

Fixes GH-8896

show more ...

Revision tags: php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30
# c5ffa0a1 06-Jun-2022 Máté Kocsis

Declare ext/json constants in stubs (#8716)

Revision tags: php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1
# 54440fa6 31-Mar-2022 Ilija Tovilo

Merge branch 'PHP-8.1'

* PHP-8.1:
Register JSON_ERROR_NON_BACKED_ENUM constant (#8285)


# 2145f80d 31-Mar-2022 Ilija Tovilo

Register JSON_ERROR_NON_BACKED_ENUM constant (#8285)

Fixes GH-8238

Revision tags: php-8.0.18RC1
# ec53e17a 16-Mar-2022 George Peter Banyard

Use more appropriate types in JSON extension (#8194)

Mainly zend_result

Revision tags: php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1
# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1
# 269c8dac 10-Jun-2020 Ilija Tovilo

Implement enums

RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6489.

# 98fb565c 05-Feb-2021 Máté Kocsis

Generate class entries from stubs for another batch of extensions

Closes GH-6669

# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

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

Replace zend_bool uses with bool

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.

show more ...

# 1b2aba28 14-Jan-2021 Nikita Popov

Remove Z_PARAM separate params where they don't make sense

Separation can only possibly make sense for array parameters
(or something that can contain arrays, like zval parameters). It

Remove Z_PARAM separate params where they don't make sense

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.

show more ...

# aa0d886c 22-Oct-2020 Nikita Popov

Don't leak json error_code across requests

# 2b5de6f8 01-Jul-2020 Max Semenik

Remove proto comments from C files

Closes GH-5758

Revision tags: php-7.4.7, php-7.3.19
# 88355dd3 07-Jun-2020 twosee

Constify char * arguments of APIs

Closes GH-5676.

Revision tags: php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17
# 3fe49d81 11-Apr-2020 Máté Kocsis

Generate method entries from stubs for a couple of extensions

Closes GH-5368

# 50765075 01-Apr-2020 Máté Kocsis

Improve some ValueError messages

Closes GH-5340

# 5322de1b 04-Apr-2020 Máté Kocsis

Generate functions entries from stubs for another set of extensions

Closes GH-5351

Revision tags: php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1
# 8f4f1dea 03-Jan-2020 Máté Kocsis

Convert zend_parse_parameters_none() to fast ZPP

I've done the conversion in those extensions where fast ZPP is predominant.

# 01a50778 02-Jan-2020 Máté Kocsis

Use RETURN_THROWS() after zend_throw_exception() in most of the extensions

# 12ce73a5 31-Dec-2019 Máté Kocsis

Use RETURN_THROWS() after zend_value_error()

# 34570372 31-Dec-2019 Máté Kocsis

Use RETURN_THROWS() during ZPP in most of the extensions

Except for some bigger ones: reflection, sodium, spl

Revision tags: php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1
# 734932ec 08-Dec-2019 George Peter Banyard

Convert warnings to ValueError

Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1
# 49b98b4d 05-Oct-2019 Christoph M. Becker

Add arginfo stub for JsonSerializable

12345678910