Christopher Dunn [Thu, 21 May 2015 05:47:35 +0000 (00:47 -0500)]
Merge pull request #276 from bmyerz/master
make the unix cmake example work
Christopher Dunn [Thu, 21 May 2015 01:33:31 +0000 (20:33 -0500)]
Merge pull request #282 from keithkml/patch-1
Clarify which parts of README for users vs devs
Christopher Dunn [Thu, 21 May 2015 01:24:37 +0000 (20:24 -0500)]
Merge pull request #280 from mgorny/pkg-config-fix
Fix custom includedir & libdir substitution in pkg-config
Keith Lea [Wed, 20 May 2015 16:43:47 +0000 (09:43 -0700)]
Clarify which parts of README for users vs devs
When I arrived at the JsonCpp GitHub page, as an intermediate C++ developer, I could not figure out how to include JsonCpp into my project. The changes I propose to the README make this much clearer, and define a clear distinction between which instructions are for those developing and contributing to JsonCpp, and those who are just using it.
Michał Górny [Tue, 19 May 2015 15:32:31 +0000 (17:32 +0200)]
Fix custom includedir & libdir substitution in pkg-config
Do not prepend ${prefix} to substituted includedir & libdir
in the pkg-config file -- if the paths are overriden by user, CMake puts
absolute paths there (even if user specifies a relative path). Instead,
use the absolute path provided by CMake and appropriately default
LIBRARY_INSTALL_DIR & INCLUDE_INSTALL_DIR to absolute paths with
${CMAKE_INSTALL_PREFIX} prepended.
Fixes: https://github.com/open-source-parsers/jsoncpp/issues/279
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Christopher Dunn [Tue, 19 May 2015 06:53:11 +0000 (01:53 -0500)]
Merge pull request #275 from stefan-it/stefan/cmake-generator-fix
[Documentation][Markdown] Use correct help option for cmake.
Christopher Dunn [Tue, 19 May 2015 06:52:57 +0000 (01:52 -0500)]
Merge pull request #277 from gogo40/master
fix compile error on android
But note that we do not have continuous integration testing for Android. This could break again.
`snprintf` drives me crazy. It should have been part of every C library 20 years ago.
Péricles Lopes Machado [Mon, 18 May 2015 17:31:05 +0000 (14:31 -0300)]
fix compile error on android
Brandon Myers [Mon, 18 May 2015 17:06:21 +0000 (10:06 -0700)]
make the unix make example work
...by setting the archive directory variable
Stefan Schweter [Sun, 17 May 2015 11:04:40 +0000 (13:04 +0200)]
[Documentation][Markdown] Use correct help option for cmake.
Christopher Dunn [Tue, 28 Apr 2015 04:01:00 +0000 (05:01 +0100)]
address compilation probs for C++ Builder
BORLANDC compiler strangeness. Thanks to:
* Dan Liu
* Victor Chen
close #269
close #252
Christopher Dunn [Tue, 28 Apr 2015 03:57:49 +0000 (04:57 +0100)]
another fix for BORLANDC
Christopher Dunn [Tue, 28 Apr 2015 03:55:12 +0000 (04:55 +0100)]
move ctors for BORLAND
Christopher Dunn [Tue, 28 Apr 2015 00:13:39 +0000 (17:13 -0700)]
Merge pull request #266 from cdunn2001/issue-252
Use unsigned for DuplicationPolicy, to fix a problem with "C++ Builder"
IDE.
Fixes #252.
Thanks to:
* Dan Liu -- http://blog.csdn.net/gzliudan/article/details/
45264201)
* Victor Chen -- http://www.cppfans.com/sdk/json/jsoncpp.asp
Christopher Dunn [Mon, 27 Apr 2015 16:57:58 +0000 (09:57 -0700)]
a little test for issue 252, but does not fail for me
Dan Liu [Mon, 27 Apr 2015 04:20:05 +0000 (05:20 +0100)]
fix crash for "C++ Builder" IDE
http://blog.csdn.net/gzliudan/article/details/
45264201
Christopher Dunn [Mon, 27 Apr 2015 03:08:17 +0000 (20:08 -0700)]
Merge pull request #265 from cdunn2001/valgrind
run valgrind in Travis CI
Christopher Dunn [Thu, 23 Apr 2015 02:43:27 +0000 (19:43 -0700)]
run valgrind in Travis CI
Because this runs apt-get, it will not work as-is for OSX. So when
we have OSX in Travis, we will have to wrap this somehow. See #250.
Closes #222.
Christopher Dunn [Thu, 23 Apr 2015 15:58:38 +0000 (08:58 -0700)]
Merge pull request #263 from cdunn2001/static-shared
Use standard **cmake** variables, to support superprojects better.
- `JSONCPP_LIB_BUILD_SHARED` -> `BUILD_SHARED_LIBS`
- `JSONCPP_LIB_BUILD_STATIC` -> `BUILD_STATIC_LIBS`
Gaurav [Thu, 23 Apr 2015 13:34:09 +0000 (19:04 +0530)]
Use standard CMake variables - static/shared lib.
Replace JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Gaurav [Thu, 23 Apr 2015 13:33:12 +0000 (19:03 +0530)]
Use standard CMake variables - static/shared lib.
Replace JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Gaurav [Thu, 23 Apr 2015 13:30:56 +0000 (19:00 +0530)]
Use standard CMake variables - static/shared lib.
Replace JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Gaurav [Thu, 23 Apr 2015 13:28:26 +0000 (18:58 +0530)]
Use standard CMake variables - static/shared lib.
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Replaced JSONCPP_LIB_BUILD_STATIC => BUILD_STATIC_LIBS
Gaurav [Thu, 23 Apr 2015 13:25:24 +0000 (18:55 +0530)]
Use standard CMake variables - static/shared lib.
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Gaurav [Thu, 23 Apr 2015 13:23:30 +0000 (18:53 +0530)]
Use standard CMake variables - static/shared lib.
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Moved flag JSON_DLL to line no 8.
Gaurav [Thu, 23 Apr 2015 13:20:43 +0000 (18:50 +0530)]
Use standard CMake variables - static/shared lib.
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Moved definition DJSON_DLL to line 11.
Gaurav [Thu, 23 Apr 2015 13:14:32 +0000 (18:44 +0530)]
Use standard CMake variables - static/shared lib.
Replace JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS
Replace JSONCPP_LIB_BUILD_STATIC => BUILD_STATIC_LIBS
Removed workaround https://github.com/open-source-parsers/jsoncpp/issues/51
Removed OPTION for shared/static in this file.
Gaurav [Thu, 23 Apr 2015 13:09:00 +0000 (18:39 +0530)]
Use standard CMake variables - static/shared lib.
Currently JSONCPP_LIB_BUILD_SHARED variable is used as option to build static/shared libraries.
The current patch uses standard CMake variables for this.
Such a workaround is done in https://github.com/open-source-parsers/jsoncpp/issues/51
Current patch will make it generic.
Christopher Dunn [Thu, 23 Apr 2015 02:33:41 +0000 (19:33 -0700)]
fix leak in unit-tests
Christopher Dunn [Mon, 20 Apr 2015 20:10:31 +0000 (13:10 -0700)]
swap docs for default vs. strictMode
Christopher Dunn [Sun, 19 Apr 2015 00:14:33 +0000 (17:14 -0700)]
Merge pull request #244 from cdunn2001/appveyor
New `appveyor.yml`: All tests pass, in both Appveyor and Travis!
Henceforth, GitHub will run both for any pull-request, so this file will be needed in the `0.y.z` branch too.
Christopher Dunn [Fri, 17 Apr 2015 01:33:39 +0000 (18:33 -0700)]
maybe fix an error
Christopher Dunn [Fri, 17 Apr 2015 01:30:24 +0000 (18:30 -0700)]
add a comment, to force a build
Marek Kotewicz [Wed, 15 Apr 2015 16:59:05 +0000 (18:59 +0200)]
appveyor deploy init
Marek Kotewicz [Wed, 15 Apr 2015 16:49:05 +0000 (18:49 +0200)]
fixed version on appveyor build
Marek Kotewicz [Sun, 12 Apr 2015 10:41:29 +0000 (12:41 +0200)]
appveyor multiple platforms
Marek Kotewicz [Sun, 12 Apr 2015 10:25:01 +0000 (12:25 +0200)]
appveyor.yml
Christopher Dunn [Sun, 8 Mar 2015 18:35:57 +0000 (13:35 -0500)]
prefer std::string for setComment()
in case of embedded nulls
Christopher Dunn [Sat, 11 Apr 2015 19:42:37 +0000 (14:42 -0500)]
1.6.2 <- 1.6.1
Fix UTF-8 for old (deprecated) Writers.
* Do not truncate at embedded zeroes.
Christopher Dunn [Sat, 11 Apr 2015 19:44:41 +0000 (14:44 -0500)]
Merge pull request #241 from cdunn2001/fix-more-utf8
support UTF-8 (specifically, embedded zeroes) in old Writers
Christopher Dunn [Sat, 11 Apr 2015 18:23:52 +0000 (13:23 -0500)]
support UTF-8 in old Writers
We had already fixed Value to hold UTF-8 properly, but only the newer
StreamWriter was writing UTF-8 properly.
Old FasterWriter etc. were using asCString() instead of asString() in
Value::writeValue().
Hopefully this change does not break any existing code. Seems unlikely.
issue #240
Christopher Dunn [Sat, 11 Apr 2015 19:41:03 +0000 (14:41 -0500)]
Merge pull request #239 from sbc100/copyright
Add copyright information to .py files
Sam Clegg [Fri, 10 Apr 2015 01:01:33 +0000 (18:01 -0700)]
Add copyright information to .py files
This change adds explicit copyright information too python
files files. The copyright year used in each case is the
date of the first git commit of each file.
The goal is to allow jsoncpp to be integrated into the
chromium source tree which requires license information in
each source file.
fixes #234
Christopher Dunn [Tue, 31 Mar 2015 20:07:14 +0000 (15:07 -0500)]
1.6.1 <- 1.6.0
Christopher Dunn [Tue, 31 Mar 2015 17:58:11 +0000 (12:58 -0500)]
Merge pull request #232 from cdunn2001/fix-snprintf
Fix snprintf
Well, it passes Travis. But when we have time, we should clean up how snprintf is used in both reader and writer.
Christopher Dunn [Tue, 31 Mar 2015 17:39:44 +0000 (12:39 -0500)]
use std::snprintf for C++11
Baruch Siach [Tue, 24 Mar 2015 16:07:12 +0000 (18:07 +0200)]
Revert "Use std namespace for snprintf."
This reverts commit
1c58876185d2a4ed87dac4a54b82f607e74f55fd.
std::snprintf() is only available in C++11, which is not provided by
all compilers. Since the C library snprintf() can easily be used as a
replacement on Linux systems, this patch changes jsoncpp to use the C
library snprintf() instead of C++11 std::snprintf(), fixing the build error
below:
src/lib_json/json_writer.cpp:33:18: error: 'snprintf' is not a member of 'std'
See #231, #224, and #218.
Christopher Dunn [Tue, 31 Mar 2015 16:32:06 +0000 (11:32 -0500)]
Merge pull request #225 from selaselah/master
fix find_program() bug: no result in not-win sys
selaselah [Thu, 19 Mar 2015 11:18:58 +0000 (19:18 +0800)]
fix find_program() bug: no result in not-win sys
Christopher Dunn [Sun, 15 Mar 2015 18:49:24 +0000 (13:49 -0500)]
Merge pull request #221 from btolfa/forgotten-virtual-dtor
Added forgotten virtual dtor for `Json::CharReader::Factory`.
(Without this, the destructor of the derived `CharReaderBuilder` would not be called, which is a small memory leak.)
Tengiz Sharafiev [Sat, 14 Mar 2015 18:30:00 +0000 (21:30 +0300)]
Update reader.h
Christopher Dunn [Thu, 12 Mar 2015 02:36:51 +0000 (21:36 -0500)]
Merge pull request #219 from cdunn2001/c-std-headers
Close #218. Fix #214.
Connor Manning [Wed, 11 Mar 2015 18:13:42 +0000 (13:13 -0500)]
Use std namespace for snprintf.
Connor Manning [Wed, 11 Mar 2015 14:01:49 +0000 (09:01 -0500)]
Constrain MSVC _isfinite to before 2013, remove duplicate includes.
Dani-Hub [Tue, 10 Mar 2015 23:50:16 +0000 (18:50 -0500)]
Fix isfinite for MSVC.
Connor Manning [Tue, 10 Mar 2015 23:48:45 +0000 (18:48 -0500)]
Use C++ standard headers.
Dani-Hub [Mon, 9 Mar 2015 21:29:18 +0000 (22:29 +0100)]
Change exception data member
from "reference to string" to "string" (Resolves the most serious part of issue #216)
Christopher Dunn [Sun, 8 Mar 2015 19:01:28 +0000 (14:01 -0500)]
prefer ValueIterator::name() to ::memberName()
in case of embedded nulls
Christopher Dunn [Sun, 8 Mar 2015 18:10:37 +0000 (13:10 -0500)]
Merge pull request #212 from cdunn2001/macro-deprec
close #210
Dani-Hub [Sun, 8 Mar 2015 17:48:24 +0000 (18:48 +0100)]
Make preprocessor query robust against older gcc versions
Dani-Hub [Sun, 8 Mar 2015 00:19:08 +0000 (01:19 +0100)]
Provide JSONCPP_DEPRECATED definitions for clang and gcc
Christopher Dunn [Sun, 8 Mar 2015 17:57:13 +0000 (12:57 -0500)]
1.6.0
Christopher Dunn [Sun, 8 Mar 2015 17:56:32 +0000 (12:56 -0500)]
comments
Christopher Dunn [Sun, 8 Mar 2015 17:50:34 +0000 (12:50 -0500)]
Merge pull request #211 from cdunn2001/except
* Add Json::Exception and derivatives.
* Clarify when exceptions are thrown, to avoid crashes caused by malicious input.
* Use our own type (derived fro std::exception) so they are trappable.
Christopher Dunn [Sun, 8 Mar 2015 17:43:18 +0000 (12:43 -0500)]
use Json::RuntimeError
Christopher Dunn [Sun, 8 Mar 2015 17:39:27 +0000 (12:39 -0500)]
use Json::LogicError in macros
Christopher Dunn [Sun, 8 Mar 2015 17:31:00 +0000 (12:31 -0500)]
Runtime/LogicError and throwers
Christopher Dunn [Sun, 8 Mar 2015 17:20:06 +0000 (12:20 -0500)]
base Json::Exception
Christopher Dunn [Sun, 8 Mar 2015 17:05:28 +0000 (12:05 -0500)]
clarify errors
* use macros for logic errors, not input errors
* throw on parsing failure in `operator>>()`, not assert
* throw on malloc, not assert
Christopher Dunn [Sat, 7 Mar 2015 21:47:39 +0000 (15:47 -0600)]
delete debug code from test
Christopher Dunn [Sat, 7 Mar 2015 21:12:50 +0000 (15:12 -0600)]
require length
Ugh! I meant to do this long ago. It would have caught my blunder.
Christopher Dunn [Sat, 7 Mar 2015 20:51:29 +0000 (14:51 -0600)]
1.5.4 <- 1.5.3
important bug-fix (thx to datadiode@)
Christopher Dunn [Sat, 7 Mar 2015 20:49:54 +0000 (14:49 -0600)]
Merge pull request #207 from cdunn2001/fix_CZString_copy_constructor
Fix czstring copy constructor
Christopher Dunn [Sat, 7 Mar 2015 20:42:52 +0000 (14:42 -0600)]
drop unused CString ctor case
`Value::CZString::CZString(char const* str, unsigned length, DuplicationPolicy allocate)` with `allocate == duplicate` does not happen.
datadiode [Sat, 7 Mar 2015 11:19:40 +0000 (12:19 +0100)]
Trivial fixes in CZString constructors.
Christopher Dunn [Sat, 7 Mar 2015 19:33:16 +0000 (13:33 -0600)]
fix ValueTest/zeroes*
Christopher Dunn [Fri, 6 Mar 2015 22:11:41 +0000 (16:11 -0600)]
old-style enum namespacing
Christopher Dunn [Fri, 6 Mar 2015 18:58:55 +0000 (12:58 -0600)]
Merge pull request #205 from open-source-parsers/reject-dup-keys
[Shekhar (shakers007) wrote](https://sourceforge.net/p/jsoncpp/bugs/22/):
> As per RFC4627 (section 2.2), names within an object should be unique. When using JSONCPP's strict mode, parsing such an object should fail.
Christopher Dunn [Fri, 6 Mar 2015 18:35:58 +0000 (12:35 -0600)]
rejectDupKeys
Christopher Dunn [Fri, 6 Mar 2015 18:18:59 +0000 (12:18 -0600)]
add rejectDupKeys feature - not yet impld
Christopher Dunn [Fri, 6 Mar 2015 18:14:37 +0000 (12:14 -0600)]
test for repeated key in strictMode
https://sourceforge.net/p/jsoncpp/bugs/22/
Christopher Dunn [Fri, 6 Mar 2015 16:31:46 +0000 (10:31 -0600)]
change str_ for cross-compilation
https://sourceforge.net/p/jsoncpp/bugs/59/
Christopher Dunn [Fri, 6 Mar 2015 15:22:57 +0000 (09:22 -0600)]
clarify operator=
Christopher Dunn [Fri, 6 Mar 2015 15:01:43 +0000 (09:01 -0600)]
test assignment over-writes comments, but swapPayload() does not
Christopher Dunn [Fri, 6 Mar 2015 11:52:22 +0000 (05:52 -0600)]
test commentBefore
for issue #203
Christopher Dunn [Fri, 6 Mar 2015 03:45:42 +0000 (21:45 -0600)]
clarify which versions work with old compilers
Christopher Dunn [Fri, 6 Mar 2015 00:14:58 +0000 (18:14 -0600)]
1.5.3 <- 1.5.2
Christopher Dunn [Fri, 6 Mar 2015 00:14:58 +0000 (18:14 -0600)]
generate both version.h and version from CMakelists.txt
This forces consistency, since they will be re-generated whenever
a git operation alters CMakelists.txt. They are still in the repo
because users might not actually run cmake.
Christopher Dunn [Thu, 5 Mar 2015 23:42:10 +0000 (17:42 -0600)]
had trouble finding Python on Windows
With this change, `make jsoncpp_check` will still fail if Python
is missing, so our CI tests are unaffected.
Christopher Dunn [Thu, 5 Mar 2015 22:56:56 +0000 (16:56 -0600)]
Merge pull request #202 from open-source-parsers/get-with-zero
`Value::get(key, default)` with zero
Christopher Dunn [Thu, 5 Mar 2015 22:38:43 +0000 (16:38 -0600)]
fix get() for embedded zeroes in key
This method had been overlooked.
Christopher Dunn [Thu, 5 Mar 2015 22:44:41 +0000 (16:44 -0600)]
test get(key, default)
Christopher Dunn [Thu, 5 Mar 2015 22:37:42 +0000 (16:37 -0600)]
Merge pull request #201 from open-source-parsers/vs
* Copy .dll for running unit-tests in VisualStudio.
* Stop using `do{}while(0)` idiom b/c VisualStudio warns.
* Fix a warning in a test.
Christopher Dunn [Thu, 5 Mar 2015 21:19:43 +0000 (15:19 -0600)]
drop `do{}while(0)` idiom
Rationale:
* http://stackoverflow.com/questions/154136/do-while-and-if-else-statements-in-c-c-macros/154138#154138
But Visual Studio issues a warning: `warning C4127: conditional expression is constant`
* http://stackoverflow.com/questions/1946445/c-c-how-to-use-the-do-while0-construct-without-compiler-warnings-like-c412
Christopher Dunn [Thu, 5 Mar 2015 20:57:41 +0000 (14:57 -0600)]
copy .dll for unit-test
Fix 2nd problem in issue #200.
* http://stackoverflow.com/questions/
10671916/how-to-copy-dll-files-into-the-same-folder-as-the-executable-using-cmake
Q: What about the Python tests?
A: They are not normally run in Visual Studio. If desired, one can set PATH.
Christopher Dunn [Thu, 5 Mar 2015 20:41:39 +0000 (14:41 -0600)]
maybe address warning
cmake -DCMAKE_BUILD_TYPE=debug -DJSONCPP_LIB_BUILD_STATIC=OFF
-DJSONCPP_LIB_BUILD_SHARED=ON -G "Visual Studio 10" ../..
`potentially uninitialized local variable 'dist' (line 2212 of
test_lib_json/main.cpp)`
Christopher Dunn [Thu, 5 Mar 2015 16:11:43 +0000 (10:11 -0600)]
maybe fix DLL symbols for VS
Christopher Dunn [Thu, 5 Mar 2015 03:13:02 +0000 (21:13 -0600)]
1.5.2 <- 1.5.1
* Fixed compile error for VS2013.
* Added `operator[]` to Builders. Recalling previous minor versions for
bug-fixes.
Christopher Dunn [Wed, 4 Mar 2015 22:09:37 +0000 (16:09 -0600)]
Merge pull request #199 from open-source-parsers/set-builders
Setting builders
Christopher Dunn [Wed, 4 Mar 2015 21:04:19 +0000 (15:04 -0600)]
fix example in docs