Sebastian Bergmann
22f4ef45fe
sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
2010-01-03 09:23:27 +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
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
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
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
Marcus Boerger
d4f5b3f0a9
- This is PHP 6 - if this ... ever gets out
2009-03-10 23:40:06 +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
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
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
37e56d8538
- Fixed bug #46215 (json_encode mutates its parameter and has some class-specific state)
2008-10-02 03:30:54 +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
24bddd5d58
ws + cs + sync with PHP_5_3
2008-07-22 15:30:33 +00:00
Felipe Pena
61a01e1c20
- MFB: Added arginfo
2008-06-27 19:17:29 +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
Sebastian Bergmann
9b620d50b4
Bump copyright year, 2 of 2.
2007-12-31 07:12:20 +00:00
Sara Golemon
18e9c88c10
Add support for encoding options
2007-12-17 07:48:21 +00:00
Ilia Alshanetsky
6c4e9b52b9
MFB: Fixed bug #42785 (json_encode() formats doubles according to locale
...
rather then following standard syntax).
2007-10-01 15:25:01 +00:00
Dmitry Stogov
8146078f7b
Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)
2007-09-27 18:28:44 +00:00
Jan Lehnardt
314f80f647
spaces -> tabs
2007-09-01 17:17:05 +00:00
Hannes Magnusson
374e0a5d02
Fixed bug#42090 (json_decode causes segmentation fault)
2007-07-24 22:54:26 +00:00
Ilia Alshanetsky
b59b26c4bf
MFB: Fixed bug #41673 (json_encode breaks large numbers in arrays).
2007-06-13 17:10:06 +00:00
Ilia Alshanetsky
893c59ba9b
MFB: Fixed bug #41567 (json_encode() double conversion is inconsistent with
...
PHP).
2007-06-04 23:52:34 +00:00
Antony Dovgal
1607e9fa79
MFB fix for #41034
...
add missing tests
2007-04-23 10:48:13 +00:00
Andrei Zmievski
1714d379d9
MFB (handling of control characters)
2007-04-16 16:52:20 +00:00
Antony Dovgal
4676d78ab5
MFB: #40503 (json_encode() value corruption on 32bit systems with overflown values)
2007-02-19 19:44:44 +00:00
Sebastian Bergmann
3717df72ae
Bump year.
2007-01-01 09:29:37 +00:00
Ilia Alshanetsky
2dbfe66e4a
MFB: safety checks
2006-12-26 17:40:20 +00:00
Nuno Lopes
3945428c9f
MFB: little cleanup in json_determine_array_type()
2006-12-19 15:01:57 +00:00
Andrei Zmievski
c2d9e83820
Clarify why the result of json_encode() is a binary string.
2006-10-19 20:24:25 +00:00
Antony Dovgal
8fba8ef219
fix folding tags, nuke json globals
2006-10-19 10:12:19 +00:00
Antony Dovgal
05da0efe36
fix coverity issue #262 (uninitialized variable)
2006-10-19 10:01:54 +00:00
Andrei Zmievski
d33a905a16
Unicode support in JSON functions.
2006-10-17 17:56:54 +00:00
Andrei Zmievski
867d4a97d1
Patch to support primitive types. (Ilia)
2006-10-16 17:04:51 +00:00
Nuno Lopes
770b92198f
MFB
2006-07-22 15:23:23 +00:00
Antony Dovgal
7766768cfb
use E_WARNING on recursion and add null to the result to keep it valid
2006-07-20 09:33:15 +00:00
Antony Dovgal
3f197f1c3c
add recursion protection to json_encode() and new tests
2006-07-20 08:56:24 +00:00
Antony Dovgal
7589a72629
json_escape_string() doesn't use tsrm_ls, so no need to pass it
2006-07-20 07:40:41 +00:00
Ilia Alshanetsky
369b7e44a0
MFB: Fixed compiler warnings and enable Json by default.
2006-07-19 16:17:56 +00:00
Omar Kilani
aa8ab527f2
Fix PECL bug #7147 - rework comma insertion whilst encoding.
...
Add tests to package.xml.
2006-03-18 04:15:16 +00:00