Jakub Zelenka
84aad458ca
Merge branch 'PHP-7.1' into PHP-7.2
2017-12-30 17:41:45 +00:00
Jakub Zelenka
2fd0b994dd
Use seialize_precision instead of precision in all json tests
2017-12-30 17:34:01 +00:00
Jakub Zelenka
7c556c44a1
Fix bug #68567 (JSON_PARTIAL_OUTPUT_ON_ERROR can result in JSON with null key)
2017-10-15 19:36:15 +01:00
Xinchen Hui
21f049b45c
Prevent from being affected by local php.ini
2017-10-13 18:23:56 +08:00
Jakub Zelenka
41d7621f48
Fix segfault in json ignoring of invalid UTF8
2017-08-06 17:20:31 +01:00
Jakub Zelenka
0d0f7cde8c
Add JSON_INVALID_UTF8_SUBSTITUTE and JSON_INVALID_UTF8_IGNORE
...
It implements request #65082 and adds options for replacing resp.
ignoring invalid UTF-8 sequences for json_encode and json_decode.
2017-07-16 12:35:24 +01:00
Craig Duncan
16202b7d67
Don't suppress warnings in tests
2017-04-02 00:58:56 +02:00
Sara Golemon
aa2282df21
Allow JSON_OBJECT_AS_ARRAY option to actually have meaning
...
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.
2017-03-17 15:36:24 -07:00
Nikita Popov
8113daef49
json_encode(): Detect recursion earlier
...
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.
2016-11-19 23:52:08 +01:00
Jakub Zelenka
c34de0b61c
Introduce json encoder to fix globals related issues
...
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.
2016-10-30 13:20:10 +00:00
Julien Pauli
7c7dc62c11
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Do not wrap user exception in case of custom JSON serialization
Conflicts:
ext/json/json_encoder.c
2016-09-19 16:42:53 +02:00
Julien Pauli
c4f3ea10e4
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Do not wrap user exception in case of custom JSON serialization
Conflicts:
ext/json/json.c
2016-09-19 16:11:17 +02:00
Julien Pauli
1ed4b13fb6
Do not wrap user exception in case of custom JSON serialization
2016-09-19 16:06:12 +02:00
Jakub Zelenka
27acbcf4df
Add test for fixed bug #68992
2016-08-29 14:49:40 +01:00
Jakub Zelenka
37c12f8f86
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-14 14:01:36 +01:00
Jakub Zelenka
436d50a821
Merge branch 'PHP-5.6' into PHP-7.0
2016-08-14 14:00:35 +01:00
Jakub Zelenka
9f1d962ed6
Fixed bug #72787 (json_decode reads out of bounds)
2016-08-14 13:52:59 +01:00
Dmitry Stogov
ffef14a0a1
Fixed test according to FR #46600 ("_empty_" key in objects)
2016-06-22 00:56:56 +03:00
Jakub Zelenka
f0d1cca672
Use empty keys instead of _empty_ in json decoding
2016-06-20 19:44:00 +01:00
Xinchen Hui
ed0eb2bfdd
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Revert "Fixed bug #72170 (JsonSerializable may inc apply count without dec it)"
2016-05-06 20:25:43 +08:00
Xinchen Hui
197470b62f
Revert "Fixed bug #72170 (JsonSerializable may inc apply count without dec it)"
...
This reverts commit 459a7cc209
.
2016-05-06 20:25:24 +08:00
Xinchen Hui
10f8ca9151
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #72170 (JsonSerializable may inc apply count without dec it)
2016-05-06 18:39:18 +08:00
Xinchen Hui
459a7cc209
Fixed bug #72170 (JsonSerializable may inc apply count without dec it)
...
I don't want use zend_try here, but seems I have no choice :<
2016-05-06 18:38:26 +08:00
Xinchen Hui
fa5f28a0a1
Merge branch 'PHP-7.0'
2016-04-22 21:41:52 -07:00
Xinchen Hui
589d0e0f18
Fixed bug #72069 (Behavior \JsonSerializable different from json_encode)
2016-04-22 21:41:44 -07:00
Xinchen Hui
3f3180e35f
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Update test script
2016-03-22 11:28:45 +08:00
Xinchen Hui
b49ec68134
Update test script
2016-03-22 11:28:19 +08:00
Xinchen Hui
1e5ac8940a
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fix bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable)
2016-03-21 16:22:02 +08:00
Jakub Zelenka
7e069daa89
Fix bug #71835 (json_encode sometimes incorrectly detects recursion with JsonSerializable)
2016-03-20 15:56:27 +00:00
Eddie Kohler
104876dd8e
json_encode: Escape U+2028 and U+2029 more often.
...
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.
2016-01-22 19:40:58 +00:00
Jakub Zelenka
3c32019989
Merge branch 'PHP-5.6' into PHP-7.0
2015-11-15 19:13:49 +00:00
Jakub Zelenka
e5abc53701
Use the same CS for all json tests
2015-11-15 19:06:09 +00:00
Kubo2
f18ba0f9c9
Add tests for json_last_error()/json_last_error_msg() failures
2015-07-21 01:50:40 +02:00
Christoph M. Becker
22767a48a7
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Add tests for json_last_error()/json_last_error_msg() failures
2015-07-21 02:00:16 +02:00
Jakub Zelenka
f30503ce4e
Fix incompatible JSON errors
...
This fixes differences in error codes with PHP 5 and 7.
The malformed UTF-8 and control character error codes are
now returned even in non-string context which makes it
the same as it was in PHP 5 json ext.
2015-06-28 18:09:10 +01:00
Jakub Zelenka
64c371142c
Fix bug #62010 (json_decode produces invalid byte-sequences)
2015-06-28 17:16:12 +01:00
Jakub Zelenka
f3df3df873
Fix bug #68546 (json_decode cannot access property started with \0)
2015-06-21 15:30:33 +01:00
Hugo Fonseca
baece85399
Added test for bug 69187
2015-03-07 10:53:31 +00:00
Jakub Zelenka
ad2b751985
Merge branch 'PHP-5.6'
...
The fix for master is a bit different (it's fixed in encoder)
2015-02-22 20:54:05 +00:00
Jakub Zelenka
97d809a8a5
Merge branch 'PHP-5.5' into PHP-5.6
...
Conflicts:
ext/json/json.c
2015-02-22 20:35:03 +00:00
Jakub Zelenka
591dbcabe5
Fix bug #64695 (JSON_NUMERIC_CHECK has issues with strings that are numbers plus the letter e)
2015-02-22 20:22:47 +00:00
Julien Pauli
93315c4e1d
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
Revert "json_decode() should generate a syntax error when given ""."
Update NEWS
2015-02-04 12:48:57 +01:00
Julien Pauli
c85f12e3ac
Revert "json_decode() should generate a syntax error when given ""."
...
This reverts commit a7b3abe4e6
.
2015-02-04 12:48:17 +01:00
Jakub Zelenka
c3cd2d33ca
Fix invalid test for bug 54484
2015-02-02 20:53:27 +00:00
Jakub Zelenka
3e4c1717ee
Merge branch 'master' into jsond
2015-02-02 19:53:32 +00:00
Adam Harvey
9e20b64a5b
Merge branch 'PHP-5.6'
2015-02-02 11:12:27 +00:00
Adam Harvey
db375cfd4d
Merge branch 'PHP-5.5' into PHP-5.6
2015-02-02 11:11:05 +00:00
Adam Harvey
a7b3abe4e6
json_decode() should generate a syntax error when given "".
...
Fixes bug #68938 (json_decode() decodes empty string without error).
Patch by jeremy at bat-country dot us.
2015-02-02 11:07:34 +00:00
Jakub Zelenka
3159d518d0
Merge branch 'master' into jsond
...
Conflicts:
ext/json/JSON_parser.c
ext/json/json.c
2015-01-25 18:43:15 +00:00
Stanislav Malyshev
1fdd558e39
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fixed bug #50224 where float without decimals were converted to integer
Updated NEWS for #68371
2015-01-19 10:05:57 -08:00