Alexandru Ardelean
742e059da1
json_pointer: add json_pointer_getf/setf() function variants
...
These include support for printf() style args for path.
Adds support for calling with 'json_pointer_getf(obj, &res, "/foo/%d/%s", 0, bar)'
style args.
Makes it easier for doing more dynamic stuff/magic, without
needing to use vasprintf() externally.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-22 16:33:49 +02:00
Alexandru Ardelean
97dd7d5103
json_pointer.c: fix whitespace
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-16 16:15:53 +02:00
Eric Haszlakiewicz
8e12f4a21c
Merge pull request #285 from ebassi/revert-strdup-compat
...
Revert "compat/strdup.h: move common compat check for strdup() to own…
2016-11-09 09:56:58 -05:00
Emmanuele Bassi
7601f20d70
Revert "compat/strdup.h: move common compat check for strdup() to own file"
...
This reverts commit aaba8c1080 .
This commit breaks builddir != srcdir build, but, more importantly, it
also adds a dependency on a header, "config.h", which is not installed
and it's supposed to be private — since it's generated at configuration
time and it's not meant to be used by projects compiling against a
library.
2016-11-07 20:51:11 +00:00
Eric Haszlakiewicz
e8ce1db471
Merge pull request #283 from commodo/json_pointer
...
json_pointer: add first revision based on RFC 6901
2016-11-04 11:48:30 -04:00
Alexandru Ardelean
ee7fc26de1
tests: add test_json_pointer test
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-04 09:59:43 +02:00
Alexandru Ardelean
2fbdee19da
tests/strerror_override.c: fix compilation error
...
I got this on Mac OS X at least.
Not sure if it shows up in other envs
error:
```
strerror_override.c:53:13: error: incompatible redeclaration of library function 'strerror' [-Werror,-Wincompatible-library-redeclaration]
const char *strerror(int errno_in)
```
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-04 09:51:44 +02:00
Alexandru Ardelean
0e91183300
json_pointer: add first revision
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-04 09:51:36 +02:00
Alexandru Ardelean
aaba8c1080
compat/strdup.h: move common compat check for strdup() to own file
...
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2016-11-03 15:51:33 +02:00
Eric Haszlakiewicz
d4899bd4d5
Handle NULL objects in json_object_get_userdata() by returning NULL, but abort in json_object_set_userdata() since we can't actually do anything with the userdata.
2016-10-29 15:42:36 -04:00
Eric Haszlakiewicz
f8132f932d
Issue #280 : add a few assert() calls to ensure objects are of the appropriate type.
2016-10-29 15:31:31 -04:00
Eric Haszlakiewicz
33339ae595
Use json_visit() to clear the serializer data set when parsing so the output from test_parse reflects the actual values parsed.
2016-10-29 15:13:16 -04:00
Eric Haszlakiewicz
ecdc14f535
Add a json_c_visit() function to provide a way to iterate over a tree of json-c objects.
2016-10-29 15:01:20 -04:00
Eric Haszlakiewicz
7e12b9f47c
Fix broken key-order test in test_compare.
2016-10-10 00:13:39 -04:00
Eric Haszlakiewicz
80150a18d3
Merge pull request #272 from sgerbino/master
...
Allows for compilation with CMake on macOS
2016-10-08 13:13:33 -04:00
Eric Haszlakiewicz
818156f6f7
Merge pull request #277 from ALLTERCO/json_object_set_xxx
...
Json object set xxx
2016-10-08 12:08:53 -04:00
Stoian Ivanov
be63ba99ca
try restore windows automated builds
2016-10-07 22:54:06 +03:00
Stoian Ivanov
a26305d428
fix compiler warning for int sizes
2016-10-07 01:07:34 +03:00
Stoian Ivanov
e518b22b72
string set and tests
2016-10-07 00:51:24 +03:00
Stoian Ivanov
9a313f767f
gitignore test; add double value set checks in test
2016-10-06 23:32:19 +03:00
Stoian Ivanov
6a0667567d
some simple tests
2016-10-06 23:16:29 +03:00
Eric Haszlakiewicz
36a28fcb0c
Issue #275 : fix out of bounds read when handling unicode surrogate pairs.
2016-10-05 23:15:51 -04:00
Stoian Ivanov
05f025c075
some basic set
2016-10-05 23:55:46 +03:00
Eric Haszlakiewicz
5fd99e62ed
Merge pull request #273 from konoal/master
...
fixed wrong object name in json_object_all_values_equal
2016-09-28 08:08:01 -04:00
Eric Haszlakiewicz
5653bc61a4
Merge pull request #274 from pepevel/master
...
Support for 64 bit pointers on Windows
2016-09-28 08:05:50 -04:00
pepevel
0df34b4c96
Support for 64 bit pointers on Windows
2016-09-27 20:12:03 +01:00
Alexey Konovalov
b2fbf93df0
fixed wrong object name in json_object_all_values_equal
2016-09-27 11:20:49 +03:00
Steve Gerbino
c5c93724fe
Changed CMake variables and adding output for debugging
2016-09-26 00:19:46 -04:00
Steve Gerbino
0c749d96ea
Target C99 standards to get rid of warnings
2016-09-26 00:09:55 -04:00
Steve Gerbino
928858457b
Modified the execute_process commands
2016-09-25 23:08:39 -04:00
Steve Gerbino
bdead39f63
Changed PROJECT_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR to fix building when used as external project
2016-09-25 22:32:35 -04:00
Steve Gerbino
702b42eaf3
Modified CMakeLists.txt to use autotools to generate configuration for Unix systems
2016-09-25 22:03:56 -04:00
Steve Gerbino
43afcc0d99
Lowered CMake required version so that Travis CI is able to build, moved include folder to include/json-c to match the behavior of autotools
2016-09-25 18:49:34 -04:00
Steve Gerbino
fe941a26a3
Trailing slash seems necessary in the install command to get contents
2016-09-25 15:04:05 -04:00
Steve Gerbino
ab7c09dc8e
Forget DESTINATION in CMake install command
2016-09-25 14:59:38 -04:00
Steve Gerbino
34b4a490b1
We need to also install the generated configuration files
2016-09-25 14:57:15 -04:00
Steve Gerbino
989e39d995
Fixed typo in CMakeList.txt FILES_MATCHING
2016-09-25 14:46:33 -04:00
Steve Gerbino
e2ee223dc2
Added install instructions for CMake
2016-09-25 14:42:14 -04:00
Steve Gerbino
69f018c49e
Resolves json-c/json-c#271 by adding MacOS configuration files and modifies CMakeLists.txt to use them
2016-09-25 02:14:57 -04:00
Stoian Ivanov
fae09456ae
json_object_set_boolean for upstream style check
2016-09-21 01:31:00 +03:00
Eric Haszlakiewicz
9f9c3326fe
Merge pull request #267 from sixlettervariables/patch-1
...
Removes me as Win32 maintainer, because I'm not.
2016-09-12 18:19:26 -04:00
Christopher Watford
21e5ffbcf8
Removes me as a maintainer, because I'm not.
...
Updates README-WIN32.html to remove my status as a maintainer (I'm not). Also removes ancient porting notes and adds a reference to json_config.h.win32 which is where most folks should go to start with Windows issues.
2016-09-12 14:18:21 -04:00
Eric Haszlakiewicz
ea1499a372
Issue #263 : add const so the prototype for json_object_object_add_ex() matches the definition.
2016-08-24 23:41:22 -04:00
Randy Armstrong
c5b5a984cd
Add Cmakefile
2016-08-24 22:49:16 -04:00
Eric Haszlakiewicz
0fcf1d1ae7
Fix memory leak and inconsistent output (due to varying fd numbers) in test_util_file.
2016-08-20 23:06:22 -04:00
Eric Haszlakiewicz
5fccfed4f4
Issue #260 : add a check to prevent trivial loops in the object tree, even though it is up to the callers to avoid doing so in more complex cases.
2016-08-20 22:42:59 -04:00
Eric Haszlakiewicz
c4d060bf80
json_object_object_add_ex() should have shared code with json_object_object_add(), and been changed to return int at the same time the latter was. Do that now.
...
Also correct a couple of calls to _to_json_string to check the return value.
2016-08-20 22:42:59 -04:00
Eric Haszlakiewicz
e40505e489
Merge branch 'RyDroid-tests'
2016-08-13 09:17:25 -04:00
Eric Haszlakiewicz
61cd433131
Merge branch 'tests' of https://github.com/RyDroid/json-c into RyDroid-tests
...
Conflicts:
tests/test_util_file.c
2016-08-13 09:17:01 -04:00
Eric Haszlakiewicz
e076ae756d
Merge pull request #251 from RyDroid/editorconfig
...
Adding a file for EditorConfig
2016-08-13 08:31:57 -04:00