Commit Graph

26 Commits

Author SHA1 Message Date
Scott MacVicar
18b7f018e3 Fix Bug #53963, error code isn't always set in certain error cases. 2011-02-09 08:05:00 +00:00
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.
2010-05-21 22:59:58 +00:00
Kalle Sommer Nielsen
9e230424b5 Cast to unsigned char to prevent compiler warning 2009-05-19 16:06:00 +00:00
Scott MacVicar
d2a7785878 MFH Allow a custom recursion depth to be specified for json_decode() 2009-05-14 22:02:08 +00:00
Matt Wilmas
91d325dd72 MFH: Avoid 2 conversions when decoding numbers 2009-03-19 19:26:00 +00:00
Scott MacVicar
3a0c86327f MFH Deal with overflow when decoding large numbers 2009-03-17 14:57:39 +00:00
Scott MacVicar
07e675cc52 MFH Fix bug #47644 - Valid integers are truncated with json_decode() 2009-03-17 02:00:13 +00:00
Scott MacVicar
fdf2d1e46f 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]
2008-12-19 02:00:57 +00:00
Scott MacVicar
6393540c75 MFH Fix Windows build 2008-12-17 15:46:21 +00:00
Scott MacVicar
8ef7fe1d99 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:40:06 +00:00
Matt Wilmas
d5295fc9c8 MFH: Changed logic for LONG_MIN 2008-12-02 14:50:22 +00:00
Rasmus Lerdorf
2f469e8c15 We can afford a larger stack here and other json parsers out there
go deeper than 128.
2008-07-30 13:52:59 +00:00
Yiduo (David) Wang
4b4d634cb9 MFH: Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:22:07 +00:00
Ilia Alshanetsky
c969e9005b Handle very small longs via double 2007-06-13 17:56:41 +00:00
Ilia Alshanetsky
9f28e21bb1 Fixed bug #41673 (json_encode breaks large numbers in arrays). 2007-06-13 17:07:58 +00:00
Ilia Alshanetsky
faae3e9ecf Fixed bug #41504 (json_decode() incorrectly decodes JSON arrays with empty
string keys).
2007-05-27 16:31:35 +00:00
Rasmus Lerdorf
c7069887a4 Make the code match the commit comment 2007-05-24 22:40:02 +00:00
Rasmus Lerdorf
464d87e58b I don't see any reason to leave the stack limitation at 20. We have
reports of this limit being hit now and as far as I can tell bumping it
to 128 isn't going break anything in the parser code.
2007-05-24 22:37:59 +00:00
Antony Dovgal
09a575a20f MFH: fix #41403 (json_decode cannot decode floats if localeconv decimal_point is not '.') 2007-05-16 12:54:30 +00:00
Ilia Alshanetsky
8b245e5aaf Fixed bug #41067 (json_encode() problem with UTF-16 input). 2007-04-16 22:31:05 +00:00
Andrei Zmievski
b62d120580 Fix processing of control characters; they should be escaped as \u
sequences.
2007-04-13 21:34:12 +00:00
Antony Dovgal
cff6e2b446 initialize variable 2006-07-25 09:06:55 +00:00
Nuno Lopes
ff591e2cf0 more const keywording 2006-07-22 15:22:56 +00:00
Antony Dovgal
60720d285f MFH: ZTS fix 2006-07-20 09:19:02 +00:00
Antony Dovgal
0b97d2bd60 fix segfault, add test 2006-07-20 08:24:31 +00:00
SVN Migration
608baa409a This commit was manufactured by cvs2svn to create branch 'PHP_5_2'. 2006-05-05 15:49:42 +00:00