Dmitry Stogov
9c2a1f52a5
Avoid useless dereferences and separations during paramter passing.
2017-06-19 12:55:59 +03:00
Dmitry Stogov
6fe75aad6d
Optimization for fast path.
2017-06-19 10:07:11 +03:00
Jakub Zelenka
8ec45be8db
Merge branch 'PHP-7.1'
2017-06-18 18:32:19 +01:00
Jakub Zelenka
bfa9362d43
Merge branch 'PHP-7.0' into PHP-7.1
2017-06-18 18:28:54 +01:00
Jakub Zelenka
887fabe78f
Regenerate and bump re2c version to 0.16
...
It also matches the re2c version for Zend language scanner
2017-06-18 18:26:48 +01:00
Dmitry Stogov
1385784f54
Fixed performance degradaton introduced in f6ac96b
2017-06-13 12:20:14 +03:00
Jakub Zelenka
f6ac96b039
Improve and simplify UTF-8 validation in JSON
2017-06-11 17:27:32 +01:00
Dmitry Stogov
13ee8fd626
Improved UTF-8 validation in JSON
2017-05-25 01:16:17 +03: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
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Anatol Belski
25ee9465d1
add nmakefile fragment for json
2017-01-04 12:41:47 +01:00
Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Sara Golemon
6007eb7584
Use new param API in json
2016-12-31 08:35:07 -08:00
Johannes Schlüter
54f526be89
Install ext/json headers
2016-12-07 17:50:05 +01:00
Anatol Belski
bfb9be9bd4
Merge branch 'PHP-7.1'
...
* PHP-7.1:
remove TSRMLS_*
2016-11-22 00:33:29 +01:00
Anatol Belski
d61db8d602
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
remove TSRMLS_*
2016-11-22 00:32:42 +01:00
Anatol Belski
5e9b4c26a5
remove TSRMLS_*
2016-11-21 23:53:37 +01:00
Jakub Zelenka
563a341df7
Merge branch 'PHP-7.1'
2016-11-20 20:39:32 +00:00
Jakub Zelenka
f284479734
Merge branch 'PHP-7.0' into PHP-7.1
2016-11-20 20:38:34 +00:00
Jakub Zelenka
60574ea1ac
Fix bug #73526 (php_json_encode depth issue)
2016-11-20 20:36:03 +00: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
eff075ffaa
Merge branch 'PHP-7.1'
2016-10-30 13:22:45 +00: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
Dmitry Stogov
65ea250022
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Introduced HT_IS_PACKED() and HT_IS_WITHOUT_HOLES() macros. (Benjamin Coutu)
2016-10-19 23:12:17 +03:00
Dmitry Stogov
9ded1b4edb
Introduced HT_IS_PACKED() and HT_IS_WITHOUT_HOLES() macros. (Benjamin Coutu)
2016-10-19 23:10:42 +03:00
Johannes Schlüter
b7fe687914
Install ext/json headers so that other extension can parse, too
2016-10-18 14:48:17 +02: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
Julien Pauli
b41abf7496
Fix 73113 - Segfault with throwing JsonSerializable
2016-09-19 15:16:14 +02:00
Jakub Zelenka
c4961fa8b6
Bump PHP_JSON_VERSION to 1.5.0
2016-08-29 15:18:00 +01:00
Jakub Zelenka
27acbcf4df
Add test for fixed bug #68992
2016-08-29 14:49:40 +01:00
Jakub Zelenka
df05dbb3df
Fix recursion and protection in the failed JSON encoding
2016-08-29 14:49:40 +01:00
Jakub Zelenka
12a8c3f6e7
Add initial failure checking for json_encode
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
Jakub Zelenka
bea131f0bc
Add return code from json API functions
...
It will allow fix few json bugs in a better way
2016-06-28 20:49:38 +01:00
Jakub Zelenka
3f13507dd2
Use one place to define max length of double
...
Introduce new constant PHP_DOUBLE_MAX_LENGTH for that purpose
2016-06-26 14:03:01 +01:00
Jakub Zelenka
75b86a2c22
Replace json.precision with serialize_precision
2016-06-26 13:26:43 +01:00
Yasuo Ohgaki
5f5dc04fc2
Add cast
2016-06-26 13:26:43 +01:00
Yasuo Ohgaki
e3d9f1f4d8
Simply use ndigit for flag for zend_dtoa mode
2016-06-26 13:26:43 +01:00
Yasuo Ohgaki
3aa2aadcf0
Add JSON_G(precision)
2016-06-26 13:26:43 +01:00
Yasuo Ohgaki
f943daf2d7
Initial patch for 0 mode float conversion. The magic number is better to be improved. Any suggestion where to define it?
2016-06-26 13:26:42 +01:00
Dmitry Stogov
ffef14a0a1
Fixed test according to FR #46600 ("_empty_" key in objects)
2016-06-22 00:56:56 +03:00
Dmitry Stogov
323b2733f6
Fixed compilation warnings
2016-06-22 00:40:50 +03:00
Jakub Zelenka
f0d1cca672
Use empty keys instead of _empty_ in json decoding
2016-06-20 19:44:00 +01:00
Jakub Zelenka
0a0e42d1f5
Add php_json_yyparse for direct use in json ext
2016-05-11 21:11:47 +01:00