858 Commits

Author SHA1 Message Date
Serge Zaitsev
8da639a334 Merge pull request #60 from baskerville/master
Fix typo
2015-11-19 17:04:51 +08:00
Bastien Dejean
f06a10c1b7 Fix typo 2015-11-19 09:55:46 +01:00
Serge A. Zaitsev
076abddc19 fixed privitive value typo in tests 2015-10-31 18:43:04 +02:00
Serge A. Zaitsev
7fb89f1eb2 initialized ok variable in tests, parse should still return 1 if expected result is a failure 2015-10-31 18:37:25 +02:00
Serge A. Zaitsev
8a5ee3d41b fixed a typo in the test name 2015-10-31 18:33:43 +02:00
Serge Zaitsev
2db03781c5 Merge pull request #55 from goriy/example_realloc_fix
small fix of jsondump example for cases of realloc failures
2015-10-25 22:42:48 +02:00
goriy
2d185aa465 tiny realloc function wrapper which handles cases of realloc failures
Memory reallocation with old data pointer handling is done by means
of realloc_it() function.

Tiny inline function realloc_it() is a wrapper function for standart
realloc() which frees old memory pointer and prints errno to stderr
if realloc fails.
2015-10-25 23:28:19 +03:00
goriy
e709651a20 small fix of jsondump example for cases of realloc failures
When realloc() function fails it returns NULL pointer.
But old data pointer remains valid in such a case.

It's a mistake to use old data pointer to store new
pointer returned by realloc. In case of realloc failure,
pointer is overwritten with NULL value, but old used memory
remains unreferenced and could not be even freed anymore.
Such mistakes could lead to memory leaks.
2015-10-24 23:32:51 +03:00
Serge A. Zaitsev
0c2d60b8e7 added and marked as fixme tests for false positives in objects 2015-10-17 15:25:44 +02:00
Serge A. Zaitsev
f7e6dcb7a2 added another test of invalid array 2015-10-17 15:24:44 +02:00
Serge A. Zaitsev
e5fb875b59 added another test of invalid array 2015-10-17 15:19:01 +02:00
Serge A. Zaitsev
aedc121ce8 added check for null pointer before fixing tokens after parsing is done 2015-10-17 15:14:13 +02:00
Serge A. Zaitsev
824d9a769c applied fix from wireshark 2015-10-17 15:09:35 +02:00
Serge A. Zaitsev
d0664f9a2e changed jsmnerr_t type to int 2015-10-17 15:06:39 +02:00
Serge A. Zaitsev
5e37daeec3 added issue 27 test case 2015-10-17 15:01:01 +02:00
Serge A. Zaitsev
edd751896d fixed return value on incremental parting 2015-10-17 14:58:47 +02:00
Serge A. Zaitsev
9b4e33199f moved tests into a subfolder, added table-driven tests 2015-10-17 14:58:31 +02:00
Serge A. Zaitsev
226f318224 json token type enum doesn't start with zero value anymore, fixes #24 2015-10-17 10:50:22 +02:00
Serge A. Zaitsev
d87c22d2cd removed mixed declarations and code, fixes #45 2015-10-17 10:42:30 +02:00
Serge A. Zaitsev
6809c029aa changed test function args to void, fixes #46 2015-10-17 10:39:27 +02:00
Serge A. Zaitsev
6cb9c3721d test exit status depends on number of failed tests 2015-10-17 10:29:54 +02:00
Serge Zaitsev
bd9bd55c3a Changed links to github 2015-09-24 18:22:14 +02:00
Serge A. Zaitsev
26193d39c2 updated README 2014-12-19 01:40:26 +02:00
Serge A. Zaitsev
cf38b7d171 added js string boundaries checks for string parser, fixes issue #31; added tests to cover it; fixed makefile to use custom cflags/ldflags 2014-11-17 16:21:36 +02:00
Serge A. Zaitsev
91d7389ec8 added some tests for key/values nodes and added some stricter validations 2014-11-17 15:36:18 +02:00
Serge A. Zaitsev
946a2b1e02 moved i declaration to the top of the block, issue #38 fixed 2014-11-17 15:06:12 +02:00
Serge A. Zaitsev
a0e2b876ca including stddef.h in the jsmn.h, fixed issue #28 2014-11-17 14:28:27 +02:00
Serge A. Zaitsev
838061aa96 removed trailing spaces 2014-11-17 14:14:45 +02:00
Serge A. Zaitsev
8a22e0a149 implemented key/value hierarchy; added 2 examples; fixed some warnings in tests 2014-11-17 14:13:58 +02:00
Serge Zaitsev
e0847b52b5 Merged in setekhid/jsmn/setekhid/jsmnh2822-warning-commas-at-the-end-of-e-1408807731663 (pull request #11)
jsmn.h:28:22: warning: commas at the end of enumerator lists are a C99-specific feature [-Wc99-extensions]
2014-10-09 19:49:10 +03:00
Wizard Tai
cf39341a39 jsmn.h:28:22: warning: commas at the end of enumerator lists are a C99-specific feature [-Wc99-extensions]
WITH:

-std=c89 -Wall -pedantic -Wno-declaration-after-statement
2014-08-23 15:28:58 +00:00
Serge A. Zaitsev
76cd398859 removed JSMN_SUCCESS value from the readme 2014-02-21 11:04:16 +02:00
Serge Zaitsev
f2864e69b9 Merged in MacGritsch/jsmn-patch (pull request #7)
Added "extern C" to use it with CPP.
2014-02-21 11:03:29 +02:00
Gabriel Gritsch
db379ec124 Added "extern C" to use it with CPP. 2014-02-21 09:53:45 +01:00
Gabriel Gritsch
a89501b2fb Integrate changes made by Serge Zaitsev. 2014-02-21 09:52:23 +01:00
Serge A. Zaitsev
5faee057cb edited readme about what's inside the repo. closes issue #19 2014-02-21 00:24:29 +02:00
Serge A. Zaitsev
f0ae25f873 added way to specify json string length, added test for non-strict mode 2014-02-21 00:11:52 +02:00
Serge A. Zaitsev
809c7c6db1 added way to estimate number of tokens before parsing 2014-02-20 22:27:07 +02:00
Gabriel Gritsch
733b8e958e Changes for SIZE_MAX 2014-02-16 10:54:19 +01:00
Gabriel Gritsch
c91adceded - Added possibility to specify the lenght of the input buffer (if not null-terminated).
- Added "extern C" to use it with CPP.
2014-02-16 10:45:20 +01:00
Gabriel Gritsch
659842c65c - Added possibility to specify the lenght of the input buffer (if not null-terminated).
- Added "extern C" to use it with CPP.
2014-02-16 10:42:27 +01:00
Gabriel Gritsch
385b42e740 - Added possibility to specify the lenght of the input buffer (if not null-terminated).
- Added "extern C" to use it with CPP.
2014-02-12 17:53:45 +01:00
Serge A. Zaitsev
86350f2bb1 a proper fix for signed comparison 2014-02-09 17:09:15 +02:00
Serge A. Zaitsev
da95978033 added cast size_t to int to avoid warnings, removed string.h header since it was merged by accident 2014-02-09 17:04:39 +02:00
Serge A. Zaitsev
d0ca2df480 fixed jsmntype_t definition 2014-01-27 17:11:54 +02:00
Serge A. Zaitsev
c29d151bfa added link to the web page 2014-01-27 16:04:43 +02:00
Serge Zaitsev
2b0e4464c7 Merged in frnknstn/jsmn/markdown (pull request #5)
rename README so markdown renders in source control
2014-01-27 16:09:33 +02:00
Serge Zaitsev
323395efac Merged in frnknstn/jsmn/clean (pull request #4)
delete jsmn_test.exe when doing make clean
2014-01-27 16:08:19 +02:00
Serge A. Zaitsev
40392b73e3 fixed indentation and comments style after merge 2014-01-27 15:58:43 +02:00
Peter Finlayson
e397f0dfb6 rename README so markdown renders in source control
The readme file is in markdown, but most source control systems and repos (including bitbucket) expect a markdown readme to be called README.md
2013-12-23 12:39:00 +02:00