History log of /PHP_TRUNK/ext/json/json.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a666285 01-Jan-2013 Xinchen Hui <laruence@php.net> Happy New Year
/php-src/ext/json/json.c
8bb106d 11-Dec-2012 Adam Harvey <aharvey@php.net> Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
Alter php_json_decode_ex() to respect JSON_BIGINT_AS_STRING for bare numbers.
2d1694d 11-Dec-2012 Adam Harvey <aharvey@php.net> Alter php_json_decode_ex() to respect JSON_BIGINT_AS_STRING for bare numbers.

Fixes bug #63737 (json_decode does not properly decode with options parameter).
/php-src/ext/json/json.c
495ff09 26-Nov-2012 Remi Collet <remi@php.net> Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
Related bug #63588 fix length computation + optimize for speed
7751a68 25-Nov-2012 Remi Collet <remi@php.net> Related bug #63588 fix length computation + optimize for speed

Following comment from Yoram "The patch looks fine, except of testing
for true value of utf16 in each iteration."
Also fix the length computation during check phase.
/php-src/ext/json/json.c
f4a8612 25-Nov-2012 Remi Collet <remi@php.net> Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
Fixed bug #63588 Duplicate implementation of php_next_utf8_char
289bb33 25-Nov-2012 Remi Collet <remi@php.net> Fixed bug #63588 Duplicate implementation of php_next_utf8_char

Json use an utf8 parser from a third party library, switch to
our implementation of php_next_utf8_char.
This also helps on solving #63520. All the unit tests succeed.
Our implementation also seems a little faster.

json.dsp need to be regenerated.
/php-src/ext/json/json.c
f855919 29-Jul-2012 Xinchen Hui <laruence@php.net> Fix test failed due to new feature introduced in 45d596ea
/php-src/ext/json/json.c
45d596e 24-Jul-2012 Florian Anderiasch <fa@php.net> Add optional depth parameter to json_encode #62369
/php-src/ext/json/json.c
b7903f9 01-Jul-2012 Nikita Popov <nikic@php.net> Revert JSON merges to 5.4

This reverts the following merge commits (-m 1):

405ebfcd182a39f0960ff7d7055d49053d3e0316
d372b33c9b941be9a795bf3705bd22dc5f6092c3
36fa17a5fae84ab332366a202f0a709279a2466a
/php-src/ext/json/json.c
b741d33 01-Jul-2012 Stanislav Malyshev <stas@php.net> fix bug #61359: json_encode() calls too many reallocs
/php-src/ext/json/json.c
405ebfc 28-Jun-2012 Nikita Popov <nikic@php.net> Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
Add json_last_error_msg() function
9743246 28-Jun-2012 Nikita Popov <nikic@php.net> Add json_last_error_msg() function

This replaces json_last_error(true) and is consistent with other custom
error handling functions.
/php-src/ext/json/json.c
d372b33 26-Jun-2012 Nikita Popov <nikic@php.net> Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
Improve JSON error handling

Conflicts:
ext/json/tests/bug54058.phpt
ext/json/tests/bug61537.phpt
4662151 26-Jun-2012 Nikita Popov <nikic@php.net> Improve JSON error handling

json_encode() no longer throws warnings. Instead only the error code for
json_last_error() is set.

As it is hard to debug the error from just an error code an optional
$as_string parameter was added to json_last_error(), which returns an
error message instead of an error code.
/php-src/ext/json/json.c
36fa17a 23-Jun-2012 Nikita Popov <nikic@php.net> Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
Improve json_encode error handling
- BFN

Conflicts:
ext/json/json.c
84fe2cc 23-Jun-2012 Nikita Popov <nikic@php.net> Improve json_encode error handling

json_encode() now returns bool(false) for all possible errors, throws the
respective warning and also sets the respective json_last_error() error
code. Three new error codes have been added:

* JSON_ERROR_RECURSION
* JSON_ERROR_INF_OR_NAN
* JSON_ERROR_UNSUPPORTED_TYPE

To get a partial JSON output instead of bool(false) the option
JSON_PARTIAL_OUTPUT_ON_ERROR can be specified. In this case the invalid
segments will be replaced either by null (for recursion, unsupported type
and invalid JSON) or 0 (for Inf and NaN).

The warning for invalid UTF-8 stays intact and is thrown also with
display_errors = On. If this behavior is undesired this can be remedied
later.
/php-src/ext/json/json.c
92bc49b 09-May-2012 Felipe Pena <felipensp@gmail.com> - Fixed bug #61978 (Object recursion not detected for classes that implement JsonSerializable)
/php-src/ext/json/json.c
7bbd552 02-May-2012 Stanislav Malyshev <stas@php.net> Revert "Fix bug #61537 (json_encode() incorrectly truncates/discards information) and"

This reverts commit cb2a1c71c96d7c9b2ee03d77beae0c8e0d385f1b.
The fix is not correct, not fixed after discussion on github.
Please fix the issues and reapply the patch
/php-src/ext/json/json.c
cb2a1c7 02-Apr-2012 Adam Harvey <adam@pwd.net.au> Fix bug #61537 (json_encode() incorrectly truncates/discards information) and
remove a test case that's now mooted by this fix.
/php-src/ext/json/json.c
3f3ad30 02-Apr-2012 Adam Harvey <adam@pwd.net.au> Fix bug #61537 (json_encode() incorrectly truncates/discards information) and
remove a test case that's now mooted by this fix.
/php-src/ext/json/json.c
71d894c 20-Mar-2012 David Soria Parra <dsp@php.net> Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
Adding Braces in json.c to conform with coding standards
76ef76d 19-Mar-2012 Matt Nowack <mdnowack@gmail.com> Adding Braces in json.c to conform with coding standards
/php-src/ext/json/json.c
e4ca0ed 01-Jan-2012 Felipe Pena <felipe@php.net> - Year++
/php-src/ext/json/json.c
4e19825 01-Jan-2012 Felipe Pena <felipe@php.net> - Year++
/php-src/ext/json/json.c
199b52c 17-Oct-2011 Ilia Alshanetsky <iliaa@php.net> Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects with numeric string properties)
/php-src/ext/json/json.c
d4ae4e7 17-Oct-2011 Ilia Alshanetsky <iliaa@php.net> Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects with numeric string properties)
/php-src/ext/json/json.c
0629297 29-Aug-2011 Gwynne Raskind <gwynne@php.net> Add unescaped Unicode encoding to json_encode(). Closes bug #53946. Patch by Irker and Gwynne.
/php-src/ext/json/json.c
783b053 06-Aug-2011 Felipe Pena <felipe@php.net> - Added missing PHP_FE_END/ZEND_FE_END
/php-src/ext/json/json.c
23e4385 25-Jul-2011 Felipe Pena <felipe@php.net> - Make usage of new PHP_FE_END macro
/php-src/ext/json/json.c
4b30846 25-Jul-2011 Felipe Pena <felipe@php.net> - Make usage of new PHP_FE_END macro
/php-src/ext/json/json.c
f4f2aa7 01-Jun-2011 Ilia Alshanetsky <iliaa@php.net> Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()).
/php-src/ext/json/json.c
a7dfb31 01-Jun-2011 Ilia Alshanetsky <iliaa@php.net> Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()).
/php-src/ext/json/json.c
e77bd31 30-Apr-2011 Peter Cowburn <salathe@php.net> fix method name in JsonSerializable exception message
/php-src/ext/json/json.c
ecb9d80 21-Feb-2011 Scott MacVicar <scottmac@php.net> Fix Bug #54058, invalid utf-8 doesn't set json_encode() in all cases
/php-src/ext/json/json.c
3242016 21-Feb-2011 Scott MacVicar <scottmac@php.net> Fix Bug #54058, invalid utf-8 doesn't set json_encode() in all cases
/php-src/ext/json/json.c
927bf09 01-Jan-2011 Felipe Pena <felipe@php.net> - Year++
/php-src/ext/json/json.c
0203cc3 01-Jan-2011 Felipe Pena <felipe@php.net> - Year++
/php-src/ext/json/json.c
cb9c823 16-Sep-2010 Adam Harvey <aharvey@php.net> Implement FR #44331 (Formatting option for json_encode). Bikeshedding about the
exact form of the JSON pretty printing and brace handling will only be accepted
in the form of patches. ;)
/php-src/ext/json/json.c
d8b8d22 16-Sep-2010 Adam Harvey <aharvey@php.net> Rebalance the folds in json.c.
/php-src/ext/json/json.c
726fe63 16-Sep-2010 Adam Harvey <aharvey@php.net> Implemented FR #49366 (Make slash escaping optional in json_encode()).
/php-src/ext/json/json.c
3c93eab 14-Sep-2010 Adam Harvey <aharvey@php.net> Fix English in the error message emitted when json_decode() is called with
depth <= 0.
/php-src/ext/json/json.c
1f06a6a 14-Sep-2010 Adam Harvey <aharvey@php.net> Fix English in the error message emitted when json_decode() is called with
depth <= 0.
/php-src/ext/json/json.c
e1ce0a6 06-Jul-2010 Scott MacVicar <scottmac@php.net> Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they fail to decode.
/php-src/ext/json/json.c
bc74861 06-Jul-2010 Scott MacVicar <scottmac@php.net> Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they fail to decode.
/php-src/ext/json/json.c
6eb4218 21-May-2010 Sara Golemon <pollita@php.net> Add JSON_BIGINT_AS_STRING for json_decode() to parse large numbers
as strings rather than casting to double and loosing precision.
/php-src/ext/json/json.c
ea3a653 20-May-2010 Ilia Alshanetsky <iliaa@php.net> Added support for JSON_NUMERIC_CHECK option in json_encode() that converts
numeric strings to integers.
/php-src/ext/json/json.c
cf174c1 20-May-2010 Ilia Alshanetsky <iliaa@php.net> Added support for JSON_NUMERIC_CHECK option in json_encode() that converts
numeric strings to integers.
/php-src/ext/json/json.c
1fd85e2 12-May-2010 Sara Golemon <pollita@php.net> Rename JSON_Serializable to JsonSerializable per ML discussion
/php-src/ext/json/json.c
a31a208 06-May-2010 Kalle Sommer Nielsen <kalle@php.net> Well we do need zend_throw_exception_ex ;-)
/php-src/ext/json/json.c
1381b14 05-May-2010 Sara Golemon <pollita@php.net> Add JSON_Serializable interface
Objects implementing JSON_Serializable will have
their ->jsonSerialize() method called

Similar to serialize() and __sleep()
/php-src/ext/json/json.c
45c090f 18-Apr-2010 Felipe Pena <felipe@php.net> - Fixed bug #51590 (JSON_ERROR_UTF8 is undefined)
/php-src/ext/json/json.c
6f03cbf 18-Apr-2010 Felipe Pena <felipe@php.net> - Fixed bug #51590 (JSON_ERROR_UTF8 is undefined)
/php-src/ext/json/json.c
26b08f9 30-Mar-2010 Johannes Schlüter <johannes@php.net> Remove main/php3_compat.h, for that a few references to `function_entry` have
to be replaced by `zend_function_entry`.
/php-src/ext/json/json.c
9ba1e81 03-Jan-2010 Sebastian Bergmann <sebastian@php.net> sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
/php-src/ext/json/json.c
87dbefa 27-Jul-2009 Scott MacVicar <scottmac@php.net> MFH: Add error constant when json_encode detects an invalid UTF-8 sequence.
/php-src/ext/json/json.c
2361b4e 30-Jun-2009 Stanislav Malyshev <stas@php.net> fix json shared build on Windows
/php-src/ext/json/json.c
caf8d81 24-Jun-2009 Felipe Pena <felipe@php.net> - MFH: Fixed memleak when depth arg is less than zero
/php-src/ext/json/json.c
7012d09 31-May-2009 Jani Taskinen <jani@php.net> MFH: no dots in errors
/php-src/ext/json/json.c
efc0927 31-May-2009 Andrei Zmievski <andrei@php.net> Expose encode/decode API.
/php-src/ext/json/json.c
105272b 15-May-2009 Kalle Sommer Nielsen <kalle@php.net> MFH: Fix arginfo
/php-src/ext/json/json.c
d2a7785 14-May-2009 Scott MacVicar <scottmac@php.net> MFH Allow a custom recursion depth to be specified for json_decode()
/php-src/ext/json/json.c
c2b15e9 17-Mar-2009 Scott MacVicar <scottmac@php.net> MFH Replace magic values with a define for json encoding, makes reading it a bit easier
/php-src/ext/json/json.c
8d2a5ca 17-Mar-2009 Scott MacVicar <scottmac@php.net> MFH Add PHP_JSON_FORCE_OBJECT for forcing an object output of an array
/php-src/ext/json/json.c
08659c2 31-Dec-2008 Sebastian Bergmann <sebastian@php.net> MFH: Bump copyright year, 3 of 3.
/php-src/ext/json/json.c
7fe245a 24-Dec-2008 Scott MacVicar <scottmac@php.net> MFH Make sure we clear out the error when the scalar version decoding works.
/php-src/ext/json/json.c
fdf2d1e 19-Dec-2008 Scott MacVicar <scottmac@php.net> MFH Add json_last_error() for getting a bit of information about what failed during a decode, also fixes a segfault when we have [1}
[DOC]
/php-src/ext/json/json.c
8ef7fe1 17-Dec-2008 Scott MacVicar <scottmac@php.net> Update the JSON parser with that on json.org, biggest change here is code readability. Less magic numbers in the state table.
Add missing reflection information to json_encode()
Fixes bug #45791 with 0e0 not being supported as a value
Error values are stored when encountered during parsing
/php-src/ext/json/json.c
ed5f047 12-Dec-2008 Scott MacVicar <scottmac@php.net> MFH Fix bug #45989 - json_decode() doesn't return NULL on certain invalid strings
/php-src/ext/json/json.c
fc2fb50 17-Nov-2008 Felipe Pena <felipe@php.net> - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
/php-src/ext/json/json.c
7a37fa2 02-Nov-2008 Felipe Pena <felipe@php.net> - Revert ZEND_BEGIN_ARG_INFO change
/php-src/ext/json/json.c
df10005 24-Oct-2008 Felipe Pena <felipe@php.net> - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
/php-src/ext/json/json.c
604c7f6 02-Oct-2008 Felipe Pena <felipe@php.net> - MFH: Fixed bug #46215 (json_encode mutates its parameter and has some class-specific state)
/php-src/ext/json/json.c
4e2ed54 22-Jul-2008 Jani Taskinen <jani@php.net> ws + cs
/php-src/ext/json/json.c
cb0d086 27-Jun-2008 Felipe Pena <felipe@php.net> - Added arginfo
/php-src/ext/json/json.c
1a41611 30-Jan-2008 Dmitry Stogov <dmitry@php.net> ZTS fix
/php-src/ext/json/json.c
b4443f3 30-Jan-2008 Stanislav Malyshev <stas@php.net> fix #43941: invalid utf-8 not accepted
/php-src/ext/json/json.c
d1dded8 31-Dec-2007 Sebastian Bergmann <sebastian@php.net> MFH: Bump copyright year, 2 of 2.
/php-src/ext/json/json.c
cce0343 17-Dec-2007 Sara Golemon <pollita@php.net> MFH (json.c r-1.32) Add support for encoding options
/php-src/ext/json/json.c
36cf6a2 01-Oct-2007 Ilia Alshanetsky <iliaa@php.net> Fixed bug #42785 (json_encode() formats doubles according to locale rather
then following standard syntax).
/php-src/ext/json/json.c
6c810b0 27-Sep-2007 Dmitry Stogov <dmitry@php.net> Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)
/php-src/ext/json/json.c
e3b8cf0 24-Jul-2007 Hannes Magnusson <bjori@php.net> MFH: Fixed bug#42090 (json_decode causes segmentation fault)
/php-src/ext/json/json.c
17ee976 23-Jul-2007 Antony Dovgal <tony2001@php.net> fix ws/folding
/php-src/ext/json/json.c
9f28e21 13-Jun-2007 Ilia Alshanetsky <iliaa@php.net> Fixed bug #41673 (json_encode breaks large numbers in arrays).
/php-src/ext/json/json.c
045b283 04-Jun-2007 Ilia Alshanetsky <iliaa@php.net> Fixed bug #41567 (json_encode() double conversion is inconsistent with PHP).
/php-src/ext/json/json.c
de4408c 25-May-2007 Hannes Magnusson <bjori@php.net> MFH: protos (patch by jeffg at activestate dot com)
/php-src/ext/json/json.c
b62d120 13-Apr-2007 Andrei Zmievski <andrei@php.net> Fix processing of control characters; they should be escaped as \u
sequences.
/php-src/ext/json/json.c
a133297 12-Apr-2007 Ilia Alshanetsky <iliaa@php.net> Fixed bug #41034 (json_encode() ignores null byte started keys in arrays)
/php-src/ext/json/json.c
5e274ea 18-Feb-2007 Ilia Alshanetsky <iliaa@php.net> Fixed bug #40503 (json_encode() value corruption on 32bit systems with
overflown values).
/php-src/ext/json/json.c
e8d2c94 12-Jan-2007 Antony Dovgal <tony2001@php.net> MFH: nuke skeleton leftovers
/php-src/ext/json/json.c
4223aa4 01-Jan-2007 Sebastian Bergmann <sebastian@php.net> MFH: Bump year.
/php-src/ext/json/json.c
7efb0a1 25-Dec-2006 Ilia Alshanetsky <iliaa@php.net> Use safe_emalloc()
/php-src/ext/json/json.c
078fda3 19-Dec-2006 Nuno Lopes <nlopess@php.net> remove NOP code in json_determine_array_type(), as we already know the zval passed is an array (based on patch by Ron Korving)
/php-src/ext/json/json.c
57f295d 03-Nov-2006 Ilia Alshanetsky <iliaa@php.net> Fixed bug #38680 (Added missing handling of basic types in json_decode).

# already in HEAD
/php-src/ext/json/json.c
ddb4d1f 14-Aug-2006 Nuno Lopes <nlopess@php.net> move static declaration to *.c files
mroe static/const keywording
/php-src/ext/json/json.c
ff591e2 22-Jul-2006 Nuno Lopes <nlopess@php.net> more const keywording
/php-src/ext/json/json.c
3003cd2 20-Jul-2006 Antony Dovgal <tony2001@php.net> MFH: use E_WARNING on recursion and add null to the result to keep it valid
/php-src/ext/json/json.c
3e308d3 20-Jul-2006 Antony Dovgal <tony2001@php.net> MFH: add recursion protection to json_encode() and new tests
/php-src/ext/json/json.c
074feed 20-Jul-2006 Antony Dovgal <tony2001@php.net> MFH
/php-src/ext/json/json.c
cdfe00b 19-Jul-2006 Ilia Alshanetsky <iliaa@php.net> Fixed compiler warnings and enable Json by default.
/php-src/ext/json/json.c
608baa4 05-May-2006 SVN Migration <svn@php.net> This commit was manufactured by cvs2svn to create branch 'PHP_5_2'.
/php-src/ext/json/json.c