Commit graph

179 commits

Author SHA1 Message Date
Yasuo Ohgaki
3aa2aadcf0 Add JSON_G(precision) 2016-06-26 13:26:43 +01: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
Nikita Popov
f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01: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
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Jakub Zelenka
539db00538 Simplify JSON constants registration 2015-09-04 20:00:29 +01:00
Jakub Zelenka
6e5574807f Add my name to authors for previous refactoring
Related to jsond changes
2015-09-04 19:56:59 +01:00
Joe Watkins
26e619b192 these need to be exported for extensions that use json 2015-09-03 19:28:34 +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
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
Anatol Belski
af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Anatol Belski
ef2fd13de8 fix datatype mismatches 2015-02-09 11:06:02 +01: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
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
Juan Basso
ac7cfad3b5 Fixed bug #50224 where float without decimals were converted to integer 2015-01-19 00:46:02 -08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Juan Basso
95cef47afb Porting implementation of RFC json_preserve_fractional_part 2015-01-12 21:29:52 -05:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Jakub Zelenka
b68da91d52 Merge branch 'master' into jsond
Conflicts:
	ext/json/JSON_parser.c
	ext/json/JSON_parser.h
	ext/json/config.m4
	ext/json/config.w32
	ext/json/json.c
	ext/json/php_json.h
2014-12-27 19:42:04 +00:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Jakub Zelenka
f18aae6042 Fix compilation for json_encoder 2014-11-30 17:47:17 +00:00
Jakub Zelenka
a4e59c39a7 Add missing bits to php_json.h 2014-11-25 20:36:41 +00:00
Jakub Zelenka
e18dd67975 Move json encoding stuff 2014-11-24 20:46:13 +00:00
Anatol Belski
fea10f6a5e ext/iconv, ext/json and ext/session use static tsrmls pointer 2014-10-17 14:16:40 +02:00
Nikita Popov
016a96c7c2 Fix ::jsonSerialize() failure message 2014-10-12 20:55:51 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Nikita Popov
37aaccad7d Use inline functions for most of smart_str
smart_str_free_ex no longer exists, always use smart_str_free instead.

smart_str_alloc no longer requires a newlen variable to be in scope,
instead it returns the new length.
2014-09-19 23:39:07 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Anatol Belski
232459efd0 fix signature 2014-08-27 22:13:01 +02:00
Anatol Belski
6db8d4f829 's' works with size_t round 3 2014-08-27 20:49:36 +02:00
Anatol Belski
3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Dmitry Stogov
37f9f10f01 Improved performance of json_encode() 2014-08-27 13:37:54 +04:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
1958857225 ported ext/json 2014-08-19 20:15:59 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Lior Kaplan
543d5eb495 Merge branch 'PHP-5.6'
* PHP-5.6:
  typofixes

Conflicts:
	ext/spl/php_spl.c
2014-08-17 15:53:33 +03:00