Commit Graph

320 Commits

Author SHA1 Message Date
Eric Haszlakiewicz
1e89ba68af Create a tests subdirectory and move one of the test to there. 2012-04-22 10:27:50 -05:00
Eric Haszlakiewicz
020ed640e8 Merge pull request #20 from kdopen/master
Additional explanatory comments
2012-04-19 21:03:22 -07:00
Keith Derrick
bcfd1f57ac Add alternative iterator implementation 2012-04-12 11:51:23 -07:00
Keith Derrick
6917586acf Add NULL-safe get object method
New json_object_object_get_ex() method protects itself against null pointers
and invalid objects being passed in.
2012-04-12 11:50:08 -07:00
Keith Derrick
4a2cd966f5 Add NULL-safe lookup function
New lh_table_lookup_ex() method protects itself against null pointers
and invalid objects being passed in.
2012-04-12 11:47:56 -07:00
Keith Derrick
74d830dc03 Add JASSERT macro to guarantee aborts 2012-04-12 11:47:56 -07:00
Keith Derrick
ca519fb817 Added explanatory notes to documentation. 2012-04-05 19:54:12 -07:00
Keith Derrick
65f649b7ba Ignoring additional build products 2012-04-05 19:38:02 -07:00
Keith Derrick
30dd367c0a Modify install names for library and include files
Changing root name of library to json-c, and also the
directory where header files are installed to .../jsdon-c/*.

This avoids clashes with other implementations of JSON libraries.
2012-04-05 19:38:02 -07:00
Keith Derrick
21d3706192 Added explanatory notes to documentation. 2012-04-05 19:37:35 -07:00
Eric Haszlakiewicz
e0fa94ba31 Fix some bugs with how buffer sizes were being calcuated in printbuf_memset and an off-by-one error in printbuf_memappend. 2012-04-04 17:11:38 -07:00
Eric Haszlakiewicz
7f3298da85 Remove the "#undef PRINTBUF_DEBUG" from printbuf.h so it can be more easily turned on in the Makefile. 2012-04-04 17:11:38 -07:00
Eric Haszlakiewicz
8310d3634c Add a printbuf_memset() function to provide an effecient way to set and append things like whitespace indentation. 2012-04-04 17:11:38 -07:00
Eric Haszlakiewicz
0d79b53456 Fix some bugs with how buffer sizes were being calcuated in printbuf_memset and an off-by-one error in printbuf_memappend. 2012-04-03 14:54:25 -05:00
Eric Haszlakiewicz
61a154e58b Remove the "#undef PRINTBUF_DEBUG" from printbuf.h so it can be more easily turned on in the Makefile. 2012-04-03 14:48:15 -05:00
Eric Haszlakiewicz
2d48543f2e Add a printbuf_memset() function to provide an effecient way to set and append things like whitespace indentation. 2012-04-02 15:39:55 -05:00
Eric Haszlakiewicz
2b5929bb13 Direct people to send bug reports to the json-c google group. 2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
a7bd85caba Remove a few more things in the distclean target to get rid of *all* generated files. 2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
f30a9ace77 Fix a bug in json_tokener_parse_ex when re-using the same tokener to parse multiple objects. Now, json_tokener_reset() does not need to be called after a valid object is parsed. 2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
30c6c4a1be Split the json_tokener_parse tests off from test1 into their own test and add several more cases to check various incremental parsing situations. 2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
bb7978c95f For the prototype for json_tokener_error_desc(). 2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
23d0da5870 Mention json_type_to_name() in the docs for json_object_get_type(). 2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
7c4a964002 Define a LH_LOAD_FACTOR constant and note the range that it can be set to.
Change the resize check from "count > size" to "count >= size" to avoid a
potential infinite loop with high load factors and a full hash table.
2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
e6668b1406 Adjust json_object_is_type and json_object_get_type so they return json_type_null for NULL objects. 2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
d7db7e81a5 Ignore several more files, include .o's, .lo's, etc... 2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
9885b30c0e Perform better error checking in json_tokener_parse_verbose and rewrite json_tokener_parse to use that instead of json_tokener_parse_ex.
Fix a typo in the string represenations of the json_tokener_error_depth error (s/to deep/too deep/)
2012-04-02 07:53:25 -07:00
Eric Haszlakiewicz
781798ccdf Direct people to send bug reports to the json-c google group. 2012-03-31 23:17:31 -05:00
Eric Haszlakiewicz
fbd207bd6b Remove a few more things in the distclean target to get rid of *all* generated files. 2012-03-31 23:17:00 -05:00
Eric Haszlakiewicz
d809fa60c5 Fix a bug in json_tokener_parse_ex when re-using the same tokener to parse multiple objects. Now, json_tokener_reset() does not need to be called after a valid object is parsed. 2012-03-31 22:53:43 -05:00
Eric Haszlakiewicz
c5c623a546 Split the json_tokener_parse tests off from test1 into their own test and add several more cases to check various incremental parsing situations. 2012-03-31 22:51:39 -05:00
Eric Haszlakiewicz
1489b081a7 For the prototype for json_tokener_error_desc(). 2012-03-31 22:49:58 -05:00
Eric Haszlakiewicz
6ff0817bac Mention json_type_to_name() in the docs for json_object_get_type(). 2012-03-31 22:47:47 -05:00
Eric Haszlakiewicz
64c0ca3690 Define a LH_LOAD_FACTOR constant and note the range that it can be set to.
Change the resize check from "count > size" to "count >= size" to avoid a
potential infinite loop with high load factors and a full hash table.
2012-03-31 17:33:58 -05:00
Eric Haszlakiewicz
aef439a175 Adjust json_object_is_type and json_object_get_type so they return json_type_null for NULL objects. 2012-03-31 13:47:28 -05:00
Eric Haszlakiewicz
7e57d63aeb Merge pull request #16 from kdopen/master
Renaming the boolean type to json_bool in json_object.h
2012-03-31 11:12:20 -07:00
Eric Haszlakiewicz
d3c37b82a6 Ignore several more files, include .o's, .lo's, etc... 2012-03-31 12:55:52 -05:00
Eric Haszlakiewicz
3620cba6d0 Perform better error checking in json_tokener_parse_verbose and rewrite json_tokener_parse to use that instead of json_tokener_parse_ex.
Fix a typo in the string represenations of the json_tokener_error_depth error (s/to deep/too deep/)
2012-03-31 12:52:59 -05:00
Keith Derrick
37e7467476 Rename boolean type to json_bool
In building large systems, there are often clashes over the
preferred base type to use for bool/boolean. At least one
experience has been with a 3rd party proprietary library which
can not be changed. In that case, boolean was a synonym for
unsigned char and used widely in packed structures.
2012-03-26 14:29:31 -07:00
Eric Haszlakiewicz
2f9091f559 Add json_tokener_get_error() and json_tokener_error_desc() to better encapsulate the process of retrieving errors while parsing.
Add documentation for the json_tokener_parse_ex() function.
2012-02-22 08:24:40 -06:00
Eric Haszlakiewicz
b21b137805 Include json_inttypes.h in json_object.h since we use types like int32_t in the API and some systems need that header to compile.
As part of this create a public json_config.h with a custom define to
decide whether to include inttypes.h to avoid conflicting with other
projects config.h header.
2012-02-15 20:47:11 -06:00
Eric Haszlakiewicz
15db9372f3 Merge branch 'master' of https://github.com/json-c/json-c 2012-02-15 19:38:07 -06:00
Eric Haszlakiewicz
44f0f62252 Issue#10: add some const qualifiers so test1 compiles again. 2012-02-15 19:37:04 -06:00
Eric Haszlakiewicz
0bc84fcaaf Merge pull request #12 from jameinel/win32-project
Some updates to make the code compatible with VC 9 (2008)
2012-02-15 17:11:47 -08:00
John Arbash Meinel
6a231e4b41 Some updates to make the code compatible with VC 9 (2008)
VC 9 doesn't support late variable declarations, and doesn't have inttypes
so we need some direct definitions of a couple of more types.
2012-02-01 09:27:49 +01:00
Eric Haszlakiewicz
faa535386a Merge pull request #11 from deweerdt/master
json_tokener_parse(): avoid possible NULL deref
2012-01-29 15:49:48 -08:00
Frederik Deweerdt
db050901fa json_tokener_parse(): avoid possible NULL deref 2012-01-18 17:01:19 -08:00
Eric Haszlakiewicz
393085a4ba Merge pull request #7 from federicoculloca/master
Added capitals to characters to json_hex_chars
2011-12-09 14:42:41 -08:00
Eric Haszlakiewicz
fc3d2114a6 Merge pull request #8 from mstorsjo/mingw
Add -no-undefined to the libtool flags
2011-12-09 14:41:40 -08:00
Martin Storsjo
a577ba376f Add -no-undefined to the libtool flags
This allows building DLLs for windows - libtool doesn't even
try to do that unless this flag is specified.
2011-11-25 23:43:25 +02:00
Federico Culloca
7ec34c9b39 Added capitalized charaters to json_hex_chars 2011-10-30 12:13:15 +01:00