Rasmus Lerdorf
e949665bc9
Fix broken json tests in all branches
2009-08-03 04:01:57 +00:00
Rasmus Lerdorf
4743436576
Fix 2 broken json tests.
...
json_decode() returns a binary string, not unicode for
efficiency, and if you are going to test invalid utf8
in a test, you have to stuff it into a binary string
or it will be valid unicode by definition.
2009-07-26 07:21:02 +00:00
Rasmus Lerdorf
f0fb480b13
There is no error code set for json_last_error if an invalid utf8
...
sequence is encountered. This fixes that. Might be worthwhile to
merge to 5.3 despite the new constant.
2009-07-22 21:32:58 +00:00
Felipe Pena
d5cb9c95b4
- Fixed memleak when depth arg is less than zero
2009-06-24 17:39:36 +00:00
Johannes Schlüter
8279c03681
The json header should be installed so other exts can use it
2009-06-23 13:09:20 +00:00
andy wharmby
845595eb7c
New json extension tests. Tested on Windows, Linux and Linux 64 bit.
2009-06-14 12:08:33 +00:00
Jani Taskinen
96d5773eb3
- No dots in error messages
2009-05-31 13:50:50 +00:00
Andrei Zmievski
3c3ae2812e
Make a note.
2009-05-31 01:45:05 +00:00
Kalle Sommer Nielsen
eec2808482
MFB: Cast to unsigned char to prevent compiler warning
2009-05-19 16:06:17 +00:00
Kalle Sommer Nielsen
cffc777534
Fix arginfo
2009-05-15 09:10:01 +00:00
Scott MacVicar
58247606a0
Throw an error rather than silently changing to the default.
2009-05-14 22:00:38 +00:00
Scott MacVicar
1c1ba8cc06
Allow the json_decode() depth to be any size, but keep the static one around for now. It might make sense to allow an unbound depth.
2009-05-14 00:13:57 +00:00
Scott MacVicar
e009672cd2
MFB Rebuild credits, was missed in previous RC
2009-04-02 09:24:16 +00:00
Matt Wilmas
efd9d3482d
Avoid 2 conversions when decoding numbers
2009-03-19 19:25:42 +00:00
Scott MacVicar
4143771208
Missing skip in tests
2009-03-17 23:29:39 +00:00
Scott MacVicar
5674e6735b
Replace magic values with a define, makes reading it a bit easier
2009-03-17 23:25:39 +00:00
Scott MacVicar
bc51a1e9f7
Add PHP_JSON_FORCE_OBJECT for forcing an object output of an array
2009-03-17 23:15:17 +00:00
Scott MacVicar
2d43af2707
Deal with overflow when decoding large numbers
2009-03-17 14:56:49 +00:00
Scott MacVicar
de4891ab2a
Fix bug #47644 - Valid integers are truncated with json_decode()
2009-03-17 02:00:08 +00:00
Marcus Boerger
d4f5b3f0a9
- This is PHP 6 - if this ... ever gets out
2009-03-10 23:40:06 +00:00
andy wharmby
bd1fbf5127
Fix tests. Add missing SKIPIF. Tested on Windows, Linux and Linux 64
2009-01-23 20:23:32 +00:00
Scott MacVicar
784b59d016
Fix bug #46944 - UTF-8 characters outside the BMP aren't encoded correctly.
2009-01-02 03:01:53 +00:00
Sebastian Bergmann
7f4dc8702a
Bump copyright year, 3 of 3.
2008-12-31 11:12:40 +00:00
Scott MacVicar
0d860e26ca
Make sure we clear out the error when the scalar version decoding works.
2008-12-24 18:09:00 +00:00
Scott MacVicar
b0b32deb12
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]
2008-12-19 02:00:59 +00:00
Scott MacVicar
d0cf756f7f
Fix Windows build
2008-12-17 15:46:00 +00:00
Scott MacVicar
f3013d0524
Test for bug #45791
2008-12-17 14:46:42 +00:00
Scott MacVicar
cae85c867a
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
2008-12-17 14:39:56 +00:00
Scott MacVicar
8e1f9c8acb
Fix bug #45989 - json_decode() doesn't return NULL on certain invalid strings
2008-12-12 23:17:44 +00:00
Matt Wilmas
509b50ed70
Changed logic for LONG_MIN
2008-12-02 14:50:01 +00:00
Felipe Pena
12c2d80194
- Fixed tests
2008-11-19 16:59:17 +00:00
Felipe Pena
43791516db
- Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro (again!)
2008-11-17 11:26:25 +00:00
Felipe Pena
e006a89e71
- Revert ZEND_BEGIN_ARG_INFO change
2008-11-02 21:10:13 +00:00
Felipe Pena
7eb2715464
- Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
2008-10-24 14:34:17 +00:00
Felipe Pena
14f94a13e1
- New test
2008-10-02 03:31:27 +00:00
Felipe Pena
37e56d8538
- Fixed bug #46215 (json_encode mutates its parameter and has some class-specific state)
2008-10-02 03:30:54 +00:00
Rasmus Lerdorf
c04ca7502c
Fix test to test higher nesting level
2008-07-31 11:49:19 +00:00
Rasmus Lerdorf
664bb141a1
We can afford a larger stack here and other json parsers out there
...
go deeper than 128.
2008-07-30 13:57:47 +00:00
Jani Taskinen
f7560881f6
MFB:-Â Fixed bug #38680 (Added missing handling of basic types in json_decode)
...
# This was claimed to be in HEAD but wasn't..some commit reverted it or
# someone didn't check for real..
2008-07-22 17:06:00 +00:00
Jani Taskinen
c11ebb4076
MFB: sync
2008-07-22 15:31:00 +00:00
Jani Taskinen
24bddd5d58
ws + cs + sync with PHP_5_3
2008-07-22 15:30:33 +00:00
Jani Taskinen
a348a5daa4
- Add missing tests (thanks for being so fucking lazy Ilia!)
2008-07-22 14:14:31 +00:00
Felipe Pena
61a01e1c20
- MFB: Added arginfo
2008-06-27 19:17:29 +00:00
Steph Fox
4be7f4aecd
- killed off UEXPECT
...
- com_dotnet gets a .cvsignore
- Ulf will take care of mysql extensions, rest complete
2008-05-27 18:16:04 +00:00
Felipe Pena
3ed829f10e
- Added some UEXPECTs
...
- Fixed some tests
2008-03-22 14:58:29 +00:00
Felipe Pena
49114611bb
FIxed tests (new error message - E_DEPRECATED)
2008-02-23 22:30:08 +00:00
Antony Dovgal
c9c775eb07
cosmetic fix
2008-02-15 09:20:19 +00:00
Dmitry Stogov
5059b53579
ZTS fix
2008-01-30 08:10:28 +00:00
Stanislav Malyshev
400c9ecf7b
fix #43941 : invalid utf-8 not accepted
2008-01-30 03:21:30 +00:00
Nuno Lopes
1dc0e94e0f
MFB: remove unused PHP_EXTNAME_API macros.
...
#in preparation for the gcc 4 visibility patch
2008-01-03 16:18:29 +00:00