Commit Graph

758 Commits

Author SHA1 Message Date
andy5995
3b108935d0 json_object.h:document json_object_new_string_len()
I also added a couple trivial, but related, suggestions.

closes #460
2018-11-27 11:35:45 -06:00
Eric Haszlakiewicz
7539ab2d2e Merge pull request #459 from andy5995/issue_438
README.html:fix link to Doxygen docs, remove WIN32 link
2018-11-25 21:19:02 -05:00
Eric Haszlakiewicz
753de5a5a9 Merge pull request #458 from andy5995/README_files_link
README.md:fix dead "file.html" link
2018-11-25 21:17:40 -05:00
Eric Haszlakiewicz
80bf857b27 Merge pull request #457 from andy5995/gitignore_build
.gitignore:add build directory
2018-11-25 21:14:34 -05:00
Eric Haszlakiewicz
aa831c7960 Merge pull request #456 from andy5995/style_perms
STYLE.txt:remove executable permissions
2018-11-25 21:14:14 -05:00
andy5995
fc1b113b29 README.html:fix link to Doxygen docs, remove WIN32 link
fixes #438
[skip ci]
2018-11-25 07:09:00 -06:00
andy5995
71f5c2d50b README.md:fix dead "file.html" link 2018-11-25 06:51:21 -06:00
andy5995
c3e11d6812 .gitignore:add build directory 2018-11-25 06:45:21 -06:00
andy5995
dba65cbd30 STYLE.txt:remove executable permissions 2018-11-25 06:43:02 -06:00
Eric Haszlakiewicz
ebe520e96e Merge pull request #450 from drizt/subproject
Allow use json-c cmake as subproject
2018-10-20 23:01:20 -04:00
Ivan Romanov
ba5a02e8a9 Allow use json-c cmake as subproject
Now json-c can be bundled to any cmake-based project and used with
couple lines of code:

add_subdirectory(json-c EXCLUDE_FROM_ALL)
target_link_libraries(MyProject json-c)
2018-10-20 10:50:15 +05:00
Eric Haszlakiewicz
994e6c1f60 Re-add creation and installation of the json-c.pc file to the cmake build. 2018-09-01 15:06:14 -04:00
Eric Haszlakiewicz
705e2fd010 Merge pull request #444 from Hawk777/document-ref-count-tokener
Document refcount of json_tokener_parse_ex return
2018-08-31 01:16:53 -04:00
Christopher Head
31d4d3dee7 Document refcount of json_tokener_parse_ex return 2018-08-30 09:18:29 -07:00
Eric Haszlakiewicz
0a8ac2ed92 Merge pull request #441 from changyongGuo/c_flag_error
fix c flag loss during cmake building
2018-08-14 20:40:49 -04:00
changyong guo
08c8231cc8 fix c flag loss during cmake building 2018-08-14 13:52:18 +08:00
Eric Haszlakiewicz
bf29aa0f8c Merge pull request #434 from unmanned-player/devel
The real CMake support
2018-07-28 11:59:46 -04:00
Eric Haszlakiewicz
91f9884591 Merge pull request #436 from jobol/master
Improve pkgconfig setting
2018-07-26 23:28:42 -04:00
Jose Bollo
d189d7b5ff Improve pkgconfig setting
This changes allows to use #include <json-c/json.h>
instead of just #include <json.h>

This is normally possible but in some tricky case
this usage is broken without this change.

Here is the case that I encountered. I had to
compile json-c fresh version for some investigations
on newer versions. Then I installed it on my local
environment using option --prefix. After that I
had 2 versions:

 - the system wide version in usual locations
   /usr/lib and /usr/include
 - mine in my HOME directory

Then, as I'm used to include <json-c/json.h>, the
included iheder's version was the system wide one
whereas the linked lib was mine.

Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
2018-07-25 15:51:02 +02:00
Unmanned Player
f2e991a341 The real CMake support
This patch provides a CMakeLists.txt file to build JSON-C library without relying on auto-tools support. This makes the build a bit more portable and cleaner.

It can detect headers and symbols and generate config.h header file based on those detections. It cannot yet handle ctest(1) as the testing itself depends on comparing the output against files. Testing would need some creative abuse of CMake :) This will be provided a few patches later and may possibly involve refactoring test cases.

The patch has been tested on GCC 4.8.5 (Linux), GCC 7.2.0 (MinGW) and Microsoft Visual C++ 16.0 (2010?) locally. Also, compiles correctly on Travis CI and AppVeyor without errors.
2018-07-24 08:06:13 +10:00
Eric Haszlakiewicz
2327b23d8e Merge pull request #431 from LeSpocky/cmake
cmake: Bump required version
2018-07-12 22:26:48 -04:00
Alexander Dahl
901d59b29f cmake: Bump required version
Using 'project(foo VERSION 1.0)' requires CMake 3.0, the VERSION option
is not part of CMake 2.8.7, see:

* https://cmake.org/cmake/help/v2.8.7/cmake.html#command:project
* https://cmake.org/cmake/help/v3.0/release/3.0.0.html#commands

The property C_STANDARD was introduced with CMake 3.1, see:

* https://cmake.org/cmake/help/v3.1/release/3.1.0.html#properties

Signed-off-by: Alexander Dahl <post@lespocky.de>
2018-07-12 21:25:38 +02:00
Eric Haszlakiewicz
3df1f98b4a Explain why we're not setting the output name for static libraries when on Windows. 2018-06-23 22:10:55 -04:00
Eric Haszlakiewicz
a056893263 Merge pull request #415 from sgbihu/master
Resolve windows name conflict
2018-06-23 22:08:25 -04:00
Eric Haszlakiewicz
e3752b5894 Issue #418: Fix docs for json_util_from_fd and json_util_from_file to say that they return NULL on failures. 2018-06-14 22:24:45 -04:00
Eric Haszlakiewicz
c1c71097a1 Issue #419: document that NULL may be passed to json_object_put(). 2018-06-12 23:16:31 -04:00
Eric Haszlakiewicz
fb042f449b Merge pull request #421 from lt-holman/install_header_file
install json_object_iterator.h header file
2018-06-08 23:45:47 -04:00
Keith Holman
37a2edf468 install json_object_iterator.h header file
When building the project using cmake then installing it.  The
definitions in `json_object_iterator.h` are required but not installed
by the cmake install rule.  This patch adds the `json_object_iterator.h`
file to the list of files to install.

Signed-off-by: Keith Holman <keith.holman@windriver.com>
2018-06-07 13:19:27 -04:00
Eric Haszlakiewicz
4bbc72f633 Merge pull request #420 from angelskieglazki/master
arraylist: Fixed names of parameters for callback function
2018-06-02 23:01:04 -04:00
max
7a4759f165 arraylist: Fix names of parameters for callback function 2018-06-01 18:21:06 +03:00
Eric Haszlakiewicz
4414d068b3 Always create debug info (pdb file) even for release builds. 2018-05-27 21:50:57 -04:00
Eric Haszlakiewicz
7038bb8061 Try the appveyor changes again, using %Configuration% instead of "Debug" 2018-05-27 18:20:32 -04:00
Eric Haszlakiewicz
dfc0fddf22 Include the json-c.lib, .pdb and .exp files in the zip file created by the appveyor build, since it seems they're needed for linking and debugging. 2018-05-27 16:07:11 -04:00
Liang, Gao
0b3616d580 Resolve windows name conflict
1. The windows dll will output the lib and dll, and rename the static
    lib will have conflict on windows.
2. Delete rename code to dismiss the conflict.
2018-05-21 16:34:13 +08:00
Eric Haszlakiewicz
c75ebe8973 Merge pull request #410 from janczer/fix-typos
Fixed typos
2018-04-24 22:01:09 -04:00
janczer
8bd62177e7 Fixed typos 2018-04-24 16:00:38 +02:00
Eric Haszlakiewicz
f8c632f579 Issue #407: fix incorrect casts in calls to ctype functions (isdigit and isspace) so we don't crash when asserts are enabled on certain platforms and characters > 128 are parsed. 2018-03-25 18:25:58 -04:00
Eric Haszlakiewicz
da4b34355d Add an parse test for content starting with a UTF8 BOM, which is _not_ a valid start to a JSON message. 2018-03-25 18:23:42 -04:00
Eric Haszlakiewicz
104aef0a6e Update the change log for the 0.13.1 release. 2018-03-05 22:54:57 -05:00
Eric Haszlakiewicz
2fd95844c3 Issue #396: check for toolchain compatibilty with _REENTRANT before adding it to CFLAGS. 2018-03-04 22:32:45 -05:00
Eric Haszlakiewicz
1e301d94be Merge pull request #402 from derwolfe/fuzz
Add fuzzers from OSS-Fuzz
2018-02-19 13:54:18 -05:00
Chris Wolfe
1e08150838 pull in fuzzers, add CI scripts later 2018-02-05 19:26:24 -06:00
Eric Haszlakiewicz
f8eb1dec64 Merge pull request #399 from jonathan-wiens/bugfix/initialize_variable
Avoid uninitialized variable warnings
2018-01-26 23:46:33 -05:00
Jonathan Wiens
cdc4e9f64b Avoid uninitialized variable warnings
Fix json_object_object_foreach to avoid uninitialized variable warnings
using ANSI C or MSC.
2018-01-17 15:57:52 +01:00
Eric Haszlakiewicz
250de31f17 Bump the major version of the .so library generated up to 4.0 to avoid conflicts because some downstream packagers of json-c had already done their own bump to ".so.3" for a much older 0.12 release. 2018-01-15 23:31:55 -05:00
Eric Haszlakiewicz
c652b6ad29 PR#394: fix breakage with VS build. 2017-12-24 14:42:58 -05:00
Eric Haszlakiewicz
d5da847f51 PR#394: don't always append the ".0" if the double value rounds to zero because some custom formats *will* include it (e.g. %.2f).
Also try to accomodate formats to explicitly exclude the decimal (e.g. %.0f).
2017-12-24 13:45:52 -05:00
Eric Haszlakiewicz
0992aac61f Remove the TRUE and FALSE defines. 2017-12-23 09:42:17 -05:00
Eric Haszlakiewicz
cfd09c87f0 Merge pull request #393 from besser82/enhancement/unsigned_refcount
json_object_private: Use unsigned 32-bit integer type for refcount
2017-12-17 09:52:27 -05:00
Björn Esser
c233f5c05e json_object_private: Use unsigned 32-bit integer type for refcount 2017-12-17 12:51:17 +01:00