Xinchen Hui
0a7395e009
Happy New Year
13 years ago
Xinchen Hui
a2045ff332
Happy New Year~
13 years ago
Adam Harvey
2d1694d4eb
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).
13 years ago
Remi Collet
7751a68824
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.
13 years ago
Remi Collet
289bb339c9
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.
13 years ago
johannes
bcc87ba68e
Revert change 3f3ad30c50: There shouldn't be new features in 5.3, especially
not if they aren't in 5.4, too.
14 years ago
Nikita Popov
b7903f9778
Revert JSON merges to 5.4
This reverts the following merge commits (-m 1):
405ebfcd18
d372b33c9b
36fa17a5fa
14 years ago
Nikita Popov
250393f925
Revert JSON changes to PHP 5.3
This reverts the following commits:
974324676b
4662151ea7
84fe2cc890
This does not revert the JSON changes released in PHP 5.3.14.
14 years ago
Stanislav Malyshev
b741d3315b
fix bug #61359 : json_encode() calls too many reallocs
14 years ago
Nikita Popov
974324676b
Add json_last_error_msg() function
This replaces json_last_error(true) and is consistent with other custom
error handling functions.
14 years ago
Nikita Popov
4662151ea7
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.
14 years ago
Nikita Popov
84fe2cc890
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.
14 years ago
Stanislav Malyshev
d84fa39667
Revert "Update test to fix breakage caused by the previous commit."
This reverts commit 05c8d4766c .
Connected to revert 7bbd5521d2 .
14 years ago
Felipe Pena
92bc49b2b0
- Fixed bug #61978 (Object recursion not detected for classes that implement JsonSerializable)
14 years ago
Stanislav Malyshev
7bbd5521d2
Revert "Fix bug #61537 (json_encode() incorrectly truncates/discards information) and"
This reverts commit cb2a1c71c9 .
The fix is not correct, not fixed after discussion on github.
Please fix the issues and reapply the patch
14 years ago
Adam Harvey
05c8d4766c
Update test to fix breakage caused by the previous commit.
14 years ago
Adam Harvey
cb2a1c71c9
Fix bug #61537 (json_encode() incorrectly truncates/discards information) and
remove a test case that's now mooted by this fix.
14 years ago
Adam Harvey
3f3ad30c50
Fix bug #61537 (json_encode() incorrectly truncates/discards information) and
remove a test case that's now mooted by this fix.
14 years ago
Matt Nowack
76ef76d2f8
Adding Braces in json.c to conform with coding standards
14 years ago
Felipe Pena
e4ca0ed09f
- Year++
14 years ago
Felipe Pena
4e19825281
- Year++
14 years ago
Ilia Alshanetsky
199b52c1d4
Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects with numeric string properties)
14 years ago
Ilia Alshanetsky
d4ae4e79db
Fixed bug #55543 (json_encode() with JSON_NUMERIC_CHECK fails on objects with numeric string properties)
14 years ago
Gwynne Raskind
81ee8a6c7b
Add test for #53946 to 5.4 (missed it when committing revision 315707)
15 years ago
Gwynne Raskind
06292974b1
Add unescaped Unicode encoding to json_encode(). Closes bug #53946 . Patch by Irker and Gwynne.
15 years ago
Felipe Pena
783b05326a
- Added missing PHP_FE_END/ZEND_FE_END
15 years ago
Felipe Pena
23e438594d
- Make usage of new PHP_FE_END macro
15 years ago
Felipe Pena
4b30846b50
- Make usage of new PHP_FE_END macro
15 years ago
Christopher Jones
52cc62d825
Remove duplicate lines present in PHP_5_3's .phpt (dtajchreber)
15 years ago
Ilia Alshanetsky
f4f2aa7583
Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()).
15 years ago
Ilia Alshanetsky
a7dfb31557
Fixed bug #54484 (Empty string in json_decode doesn't reset json_last_error()).
15 years ago
Peter Cowburn
e77bd31f3f
fix method name in JsonSerializable exception message
15 years ago
Scott MacVicar
ecb9d8019c
Fix Bug #54058 , invalid utf-8 doesn't set json_encode() in all cases
15 years ago
Scott MacVicar
3242016f28
Fix Bug #54058 , invalid utf-8 doesn't set json_encode() in all cases
15 years ago
Scott MacVicar
9b567fea6a
Fix Bug #53963 , error code isn't always set in certain error cases.
15 years ago
Scott MacVicar
18b7f018e3
Fix Bug #53963 , error code isn't always set in certain error cases.
15 years ago
Felipe Pena
927bf09c29
- Year++
15 years ago
Felipe Pena
0203cc3d44
- Year++
15 years ago
Pierre Joye
a7ffa09e18
- add PHP_INSTALL_HEADERS to all parts (core&exts) exposing headers, generate the install-headers cmd
15 years ago
Adam Harvey
cb9c8233fc
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. ;)
16 years ago
Adam Harvey
d8b8d22a0d
Rebalance the folds in json.c.
16 years ago
Adam Harvey
726fe638bb
Implemented FR #49366 (Make slash escaping optional in json_encode()).
16 years ago
Adam Harvey
3c93eab5a3
Fix English in the error message emitted when json_decode() is called with
depth <= 0.
16 years ago
Adam Harvey
1f06a6a4e8
Fix English in the error message emitted when json_decode() is called with
depth <= 0.
16 years ago
Scott MacVicar
e1ce0a64ea
Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they fail to decode.
16 years ago
Scott MacVicar
bc74861cf8
Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they fail to decode.
16 years ago
Sara Golemon
a0269a6a72
Ooops, return values...
16 years ago
Sara Golemon
6eb4218433
Add JSON_BIGINT_AS_STRING for json_decode() to parse large numbers
as strings rather than casting to double and loosing precision.
16 years ago
Ilia Alshanetsky
ea3a6539dc
Added support for JSON_NUMERIC_CHECK option in json_encode() that converts
numeric strings to integers.
16 years ago
Ilia Alshanetsky
cf174c1366
Added support for JSON_NUMERIC_CHECK option in json_encode() that converts
numeric strings to integers.
16 years ago