Commit Graph

1041 Commits

Author SHA1 Message Date
Eric Haszlakiewicz
e7bd2e97f3 Fill in the missing pieces of the release checklist. 2012-04-29 12:54:04 -05:00
Eric Haszlakiewicz
0cc1db6459 Change the format used for sprintbuf (but not scanf) to use %f instead of %lf because the "l" is unnecessary and some compilers behave differently with it present (e.g. MinGW).
Thanks for Mateusz Loskot for the fix.
2012-04-29 11:04:33 -05:00
Eric Haszlakiewicz
31faa49bd8 Ignore the new test1Formatted and test2Formatted executables. 2012-04-28 14:17:09 -05:00
Eric Haszlakiewicz
4c7f38eb9b Extend test1 and test2 to run using json_object_to_json_string_ext() based on an additional command line parameter.
Extend the run_output_test() function so we actually can pass command line
 parameters and so we can support different output files for the same test
 executable.
Also provide some hints about what to do if a test fails (i.e. set VERBOSE=1).
2012-04-28 14:14:26 -05:00
Eric Haszlakiewicz
3fcffe1bb0 Add a json_object_to_json_string_ext() function to allow the formatting of output to be selected.
There are now three options: JSON_C_TO_STRING_SPACED, JSON_C_TO_STRING_PLAIN and JSON_C_TO_STRING_PRETTY.
This also add a json_object_to_file_ext() that takes the same flags.
Existing output of json_object_to_json_string() is unchanged, and uses JSON_C_TO_STRING_SPACED.
Thanks fo Grant Edwards for the initial patches.
2012-04-28 13:26:09 -05:00
Arun Raghavan
a1221eba70 Add an Android-friendly build system
This dependson the Androgenizer project, which helps keep autofoo-based build
systems in sync with the Android build.
2012-04-26 13:18:33 +05:30
Arun Raghavan
17caddc0ab Run configure in the autogen.sh script
This is convention in most open source projects.
2012-04-26 13:18:33 +05:30
Arun Raghavan
cb29a77c94 Add a pkgconfig file for uninstalled builds
This allows systems certain types of build setups to work. Specifically, this
will help when building on Android and using json-c as a dependency for another
package.
2012-04-26 13:18:33 +05:30
Eric Haszlakiewicz
f931f61851 Fixed parsing numbers in E notation. ` 2012-04-24 22:17:13 -05:00
Eric Haszlakiewicz
4e000a65e6 Since we already use a local json_bool type, replace any stdbool.h usage with
that, since not all environments actually have a stdbool.h to use.
2012-04-24 21:54:07 -05:00
Eric Haszlakiewicz
0f8c534502 Merge pull request #25 from kdopen/doc_cleanup
Clean up documentation and correct sample code
2012-04-24 11:43:29 -07:00
Keith Derrick
ded667a612 Clean up documentation and correct sample code 2012-04-23 15:34:44 -07:00
Eric Haszlakiewicz
ec7ce26ba8 Merge pull request #23 from mloskot/mloskot-msvc-fixes
Fix missing inttypes.h definitions for Visual Studio 2010 and earliers. ...
2012-04-23 11:30:37 -07:00
Mateusz Loskot
8409dc039a Fix missing inttypes.h definitions for Visual Studio 2010 and earliers. Related to issue #22. 2012-04-23 13:11:11 +01:00
Eric Haszlakiewicz
178a4b059c Merge pull request #21 from kdopen/add_iterator
Add new iterator implementation and some NULL-pointer safety
2012-04-22 21:40:07 -07:00
Eric Haszlakiewicz
7502b377b7 Merge branch 'master' of https://github.com/json-c/json-c 2012-04-22 14:26:06 -05:00
Eric Haszlakiewicz
3d8817978c Actually save the expected output for the test_printbuf test so it passes. 2012-04-22 14:25:08 -05:00
Eric Haszlakiewicz
37cfe6bc4c Update the list of files to ignore. 2012-04-22 14:21:27 -05:00
Eric Haszlakiewicz
e5c1e87f05 Add a test for the printbuf functions. 2012-04-22 14:13:01 -05:00
Eric Haszlakiewicz
b80772a0f5 Use a different variable when referring to the json.la file, since the original lib_LTLIBRARIES means something special to automake. 2012-04-22 10:48:30 -05:00
Eric Haszlakiewicz
c1b8891a13 Move the rest of the tests into the tests subdirectory. 2012-04-22 10:33:41 -05:00
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