Eric Haszlakiewicz
e61eb409fd
Merge pull request #233 from NeoRaider/size_t3
Include stddef.h in json_object.h
9 years ago
Eric Haszlakiewicz
ce7ad480f4
Merge pull request #234 from NeoRaider/userdata
Add public API to use userdata independently of custom serializer
9 years ago
Michael Clark
0e1a057449
Remove reference to svn.metaparadigm.com
svn.metaparadigm.com no longer exists so it is not possible to use source from there.
9 years ago
Matthias Schiffer
f87e378d48
Add public API to get and set userdata
Also, json_object_set_serializer is changed to respect the userdata
and user_delete parameters when to_string_func is NULL.
9 years ago
Matthias Schiffer
c2b004ba0e
Make default double serializer ignore userdata again
The user might want to use the userdata for something different, so the
serializer should ignore it by default.
Explicitly setting the serializer to json_object_double_to_json_string will
still make it interpret the userdata as a format string.
9 years ago
Matthias Schiffer
22fdcfc71a
Include stddef.h in json_object.h
It is needed for size_t.
9 years ago
Emmanuele Bassi
28c1ca1240
Use stdint.h to check for size_t size
If we use json_inttypes.h we are going to fail when builddir != srcdir,
and since JSON_C_HAVE_INTTYPES_H is defined after the configure script
has run, including json_inttypes.h would be the equivalent on including
stdint.h anyway.
This fixes the build of json-c in the GNOME Continuous builder.
9 years ago
Eric Haszlakiewicz
7ae5c3f7a6
Issue #142 : un-deprecate json_object_object_get(), but note why you might want to use json_object_object_get_ex() instead.
9 years ago
Eric Haszlakiewicz
5e4e5f7d9d
Issue #205 : use _strdup instead of strdup on Windows.
9 years ago
Eric Haszlakiewicz
f4ca1325ae
Merge branch 'doctaweeks-fixes-for-upstream'
9 years ago
Eric Haszlakiewicz
996be85843
Fix a few places that needed adjustment for the size_t changes, including updating the range checks to use a calculated SIZE_T_MAX.
9 years ago
Eric Haszlakiewicz
9a2915ce66
Merge branch 'fixes-for-upstream' of https://github.com/doctaweeks/json-c into doctaweeks-fixes-for-upstream
9 years ago
Eric Haszlakiewicz
b2c5969aff
Merge pull request #193 from jplitza/master
Make serialization format of doubles configurable
9 years ago
Jan-Philipp Litza
21dc5dc92b
Export json_object_double_to_json_string() and use custom format string
9 years ago
Jan-Philipp Litza
2200ffa8b0
Fix code in docs for json_object_new_double_s()
9 years ago
Eric Haszlakiewicz
3345b25962
Add tests for the json_object_array_del_idx() function.
9 years ago
Eric Haszlakiewicz
9edf2418e0
Merge branch 'Protovision-master'
9 years ago
Eric Haszlakiewicz
1fb87cd196
Merge branch 'master' of https://github.com/Protovision/json-c into Protovision-master
9 years ago
Eric Haszlakiewicz
e3fb74942a
Merge pull request #216 from Jehan/master
configure: check realloc with AC_CHECK_FUNCS() to fix cross-compilation.
9 years ago
Eric Haszlakiewicz
c6a97eb9ce
Merge pull request #218 from sevan/patch-1
Use a macro to indicate C99 to the compiler
9 years ago
Eric Haszlakiewicz
82bdbdba24
Merge pull request #219 from rouault/low_heap_robustness_fixes
Fix various potential null ptr deref and int32 overflows
9 years ago
Eric Haszlakiewicz
4e0c8b55fb
Merge pull request #220 from hschaa/master
Add utility function for comparing json_objects
9 years ago
Eric Haszlakiewicz
afa9f824e7
Merge pull request #222 from chenha0/master
Fix issue #221 : JSON_C_TO_STRING_NOSLASHESCAPE works incorrectly
9 years ago
Eric Haszlakiewicz
02a2151b2b
Merge pull request #223 from minaguib/master
Clarify json_object_get_string documentation of NULL handling & return
9 years ago
Mina Naguib
138c2a6b97
Clarify json_object_get_string documentation of NULL handling & returning
9 years ago
chenha0
dffdee966f
Fix issue #221 : JSON_C_TO_STRING_NOSLASHESCAPE works incorrectly
Tests added.
9 years ago
Helmut Schaa
dec5fcd50b
Add some basic tests for verifying json_object_equal behavior
Do some basic checks on ints, doubles, strings, arrays and "complex" objects.
9 years ago
Helmut Schaa
00e475c434
Add utility function for comparing json_objects
9 years ago
Even Rouault
77a4276a8c
Fix various potential null ptr deref and int32 overflows
This fix errors that can happen when ingesting very large JSON files
when hitting the maximum heap size of the process.
9 years ago
Sevan Janiyan
7150b7f28d
Use a macro to indicate C99 to the compiler
The [AC_PROG_CC_C99 macro](https://www.gnu.org/software/autoconf/manual/autoconf-2.64/html_node/C-Compiler.html ) sets the complier to the C99 standard if the compiler does not default to such behaviour (albeit gnu99). This is better than specifically hardcoding flags
9 years ago
Jehan
79c99aeb2b
configure: check realloc with AC_CHECK_FUNCS() to fix cross-compilation.
AC_FUNC_REALLOC is messed up when cross-compiling, ending up in failed
build with "undefined reference to `rpl_realloc'" error.
AC_CHECK_FUNCS will work both with native and cross builds.
9 years ago
Eric Haszlakiewicz
537f8bcbdb
Add const qualifiers to several functions that don't modify the json_object.
9 years ago
Eric Haszlakiewicz
882b7d95cc
Issue #137 : remove config.h.in from change control.
9 years ago
Eric Haszlakiewicz
980cdd61be
Merge commit '2be921d88376e78f84d79aafa6db2714da804e59'
9 years ago
Eric Haszlakiewicz
65be8275da
Merge pull request #209 from rgerhards/fix-regression
fix regression from 2d549662be
9 years ago
Eric Haszlakiewicz
316da85818
Fix issue #201 : add a JSON_C_TO_STRING_NOSLASHESCAPE flag to turn off escaping of forward slashes.
9 years ago
Eric Haszlakiewicz
5a6a378725
Merge pull request #198 from unmole/master
Fix possible memory leak and remove superfluous NULL checks before free()
9 years ago
Emiel Bruijntjes
7e98ed93f4
subtract first, then retrieve value
9 years ago
Emiel Bruijntjes
9d85367679
added tabs instead of spaces to be compatible with rest of code
9 years ago
Emiel Bruijntjes
827f0fd8ef
update indentation
9 years ago
Emiel Bruijntjes
23ee243113
reference increment and decrement is now atomic (when using a GCC compatible compiler), which allows passing json objects between threads
9 years ago
Daniel M. Weeks
92e9a5032b
Use size_t for json object array ops
11 years ago
Daniel M. Weeks
45c56b80c4
Use size_t for array list length and size
11 years ago
Rainer Gerhards
36610fb697
fix regression from 2d549662be
That commit introduced read-only keys, but when the hash table
was resized, that attribute was not preserved. This resulted in
an invalid free at time of table destruction.
10 years ago
Eric Haszlakiewicz
c97bbd3797
Merge pull request #199 from Nzbuu/fix_vs_build
Fix build in Visual Studio
10 years ago
Eric Haszlakiewicz
b82a51a5cd
Merge pull request #200 from Nzbuu/ci_build
Add build scripts for CI platforms
10 years ago
James Myatt
239c146a4b
Appveyor: Visual Studio v140 no longer fails
10 years ago
James Myatt
fd43c2b99a
Appveyor: Create artefact with library and include files only
10 years ago
Eric Haszlakiewicz
80c1f69b9e
Use AX_APPEND_COMPILE_FLAGS() to check the various compile flags, such as -Wall, to ensure the compile supports.
10 years ago
Eric Haszlakiewicz
10d50aadf2
Remove the AC_FUNC_MALLOC check, since we don't depend on the malloc(0) behavior it checks for, and we don't provide a rpl_malloc() implementation anyway.
10 years ago