Eric Haszlakiewicz
5abc0ea444
Reformat the json_object_object_foreach macro so it is readable, and document what is allowed to be done with the object while iterating.
2012-10-20 20:10:15 -05:00
Eric Haszlakiewicz
e36e562872
Reformat json_object_object_get() and json_object_object_get_ex().
2012-10-18 17:16:36 -05:00
Eric Haszlakiewicz
5450bed051
Fix json_object_object_get() so it returns NULL if the incoming json_object is NULL.
2012-10-18 17:14:41 -05:00
Eric Haszlakiewicz
5f4739e2eb
Change json_object_put to return 1 if the object passed was actually freed. (or 0 if only the reference count was decremented)
2012-10-18 17:10:09 -05:00
Eric Haszlakiewicz
c3d1d597ab
Fix a memory leak in test1 with respect to how json_object_object_del was used.
2012-09-16 20:49:22 -05:00
Eric Haszlakiewicz
c3068bfd09
Reformat the test sources. No functional change.
2012-09-16 20:43:29 -05:00
Eric Haszlakiewicz
d1f237e28a
Fix the home page in the README, and add a list of prerequisites.
2012-09-10 17:32:14 -05:00
Eric Haszlakiewicz
059e8f4d1d
Merge pull request #44 from lastquestion/fix_gnu_macosx
...
Add an autoconf test to test whether the .section .gnu<warning>
2012-09-09 19:24:47 -07:00
Lin Xu
e7e0600405
Add an autoconf test to test whether the .section .gnu<warning>
...
works with the linker on the system, and define _warn_references
to nothing if not.
2012-09-09 17:36:30 -07:00
Eric Haszlakiewicz
4b1a0668a8
Update the set_serializer test to match the actual output.
2012-09-09 13:53:12 -05:00
Eric Haszlakiewicz
38f421a2e7
Add a json_set_serializer() function to allow the string output of a json_object to be customized.
2012-09-02 15:21:56 -05:00
Eric Haszlakiewicz
f74e8f8f9b
Add my copyright.
2012-07-29 20:02:00 -05:00
Eric Haszlakiewicz
d305cae12c
Ignore the tests/testReplaceExisting binary.
2012-07-29 20:00:28 -05:00
Eric Haszlakiewicz
8ce53f9d1e
Note the rename in the ChangeLog, and update the instructions in the README file.
2012-07-29 18:43:55 -05:00
Eric Haszlakiewicz
2f2180b70d
Take a guess as to the rename changes changes needed to the Android part of the build.
...
I think this should work, but I can't test it.
2012-07-29 18:29:38 -05:00
Eric Haszlakiewicz
1f9d199522
Re-add the "json" pkg-config file as a compatibility shim.
...
Also rename the json-c-uninstalled.pc file.
2012-07-29 18:25:09 -05:00
Eric Haszlakiewicz
9f16e25a3e
Bump the version of the new library since programs will need to be re-linked to use it.
2012-07-29 18:05:34 -05:00
Eric Haszlakiewicz
943b7a4de7
Add a compatibility symlink json->json-c in the include directory.
2012-07-29 18:05:08 -05:00
Eric Haszlakiewicz
075b783631
Add a --disable-oldname-compat option to configure to turn off the creation of the libjson.so library, and only include libjson-c.so
2012-07-29 17:48:22 -05:00
Eric Haszlakiewicz
c7a21203de
Ignore a couple more generated files.
2012-07-29 15:10:30 -05:00
Eric Haszlakiewicz
082419edf9
Fix the Libs line in json-uninstalled.pc to use -ljson-c
2012-07-29 15:09:59 -05:00
Eric Haszlakiewicz
b98aa6eaa3
Create an additional libjson.so library that simply links against libjson-c, but emits a warning encouraging the use of the new library.
2012-07-29 14:59:01 -05:00
Eric Haszlakiewicz
eb37094aa6
Check for the sys/cdefs.h header which on some systems defines the __warn_references macro.
2012-07-29 14:57:59 -05:00
Eric Haszlakiewicz
ba1c3810cb
Remove test_parse from the top level directory. (accidentally re-introduced with the last merge)
2012-07-29 14:08:26 -05:00
Eric Haszlakiewicz
c2d3ccf3af
Merge branch 'rename_library' of https://github.com/kdopen/json-c into kdopen-rename_library
...
Conflicts:
.gitignore
Makefile.am
configure.in
printbuf.c
test1.c
test1.expected
2012-07-29 14:06:52 -05:00
Eric Haszlakiewicz
92f31bd99a
Handle the \f escape sequence (the two characters: backslash followed by an f, not a literal formfeed) and extend the test_parse test to check all valid escape sequences.
2012-07-29 12:31:07 -05:00
Eric Haszlakiewicz
8fcfeb63ec
Default autogen.sh to not running configure, unless some command line options are specified.
2012-07-29 12:18:37 -05:00
Eric Haszlakiewicz
77c6239465
Initialize errno before calling sscanf in json_parse_int64() so parsing valid numbers after parsing an out of range number works.
2012-07-29 12:13:54 -05:00
Eric Haszlakiewicz
2da148df56
Merge pull request #37 from cgwalters/master
...
autogen.sh: Add /bin/sh interpreter, honor NOCONFIGURE=1 …
2012-07-29 09:46:22 -07:00
Eric Haszlakiewicz
6988f53fcb
Rewrite json_object_object_add to replace just the value if the key already exists so keys remain valid.
...
This is particularly useful when replacing values in a loop, since it allows
the key used by json_object_object_foreach to continue to be used.
2012-07-24 23:27:41 -05:00
Colin Walters
6d9437725a
autogen.sh: Add /bin/sh interpreter, honor NOCONFIGURE=1
...
First, we should be able to execute as "./autogen.sh". Second,
add support for NOCONFIGURE=1. For more information,
see http://people.gnome.org/~walters/docs/build-api.txt
2012-07-11 15:45:49 -04:00
Eric Haszlakiewicz
381f77c5bc
Merge pull request #26 from ford-prefect/master
...
Android build system
2012-07-08 19:01:19 -07:00
Eric Haszlakiewicz
4154c55eda
Add json_object_iterator.h to installed headers.
2012-07-08 20:38:53 -05:00
Eric Haszlakiewicz
9791c3896e
Fix git commands for tagging a release.
2012-07-08 20:33:25 -05:00
Eric Haszlakiewicz
eead1a7dc4
Remove unnecessary comment from json_util.c
2012-07-08 20:32:12 -05:00
Eric Haszlakiewicz
7bd49df30a
Merge pull request #33 from mloskot/master
...
Added a bunch of missing HAVE_* defines
2012-07-08 18:27:02 -07:00
Mateusz Loskot
984303dfe5
Added a bunch of missing HAVE_* defines tested with ./configure script to fix compilation on Linux with GCC 4.7.1. The issue likely caused by my previous commits related to Visual C++ port of the code.
2012-06-19 20:15:44 +01:00
Eric Haszlakiewicz
a789601e6d
Merge pull request #27 from OBI-1/master
...
array_list_expand_internal needs length, not index.
2012-05-30 22:04:05 -07:00
Eric Haszlakiewicz
c58386f33f
Merge pull request #29 from mloskot/msvc-port
...
Add missing casts from void* and replace #if HAVE_X with #ifdef HAVE_X
2012-05-30 21:57:28 -07:00
Eric Haszlakiewicz
837d685d78
Use "nodoc", not "doc", for the name of the tarball w/o docs.
2012-05-30 23:03:34 -05:00
Mateusz Loskot
271c53ebdd
Missing explicit casts from void* to specific pointers required. Added #define strcasecmp for Visual C++.
2012-05-22 23:51:44 +01:00
Mateusz Loskot
a6f39a3c0c
Replaced #if HAVE_X with #ifdef HAVE_X as the former test is troublemaker with #define HAVE_X where #define HAVE_X 1|0 is meant.
2012-05-21 23:22:36 +01:00
OBI-1
b6ff1c2f71
array_list_expand_internal needs length, not index.
...
(The current implementation will fail when adding index 65.)
2012-05-09 13:52:17 +03:00
Eric Haszlakiewicz
1abaaee658
Update the ChangeLog with the rest of the changes that will be included in the 0.10 release.
2012-04-29 12:54:14 -05:00
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