jsoncpp.git
2 weeks agochange the returned value (#1003) master
dota17 [Mon, 26 Aug 2019 19:47:54 +0000 (03:47 +0800)]
change the returned value (#1003)

2 weeks agoFix a coupe of typos (#1007)
aliha [Mon, 26 Aug 2019 19:37:05 +0000 (15:37 -0400)]
Fix a coupe of typos (#1007)

2 weeks ago Add some test cases in ValueTest (#1010)
dota17 [Mon, 26 Aug 2019 19:36:51 +0000 (03:36 +0800)]
 Add some test cases in ValueTest (#1010)

* add some test cases in ValueTest

* add some test cases in ValueTest

2 weeks agotests: Improve CharReaderFailIfExtraTest (#1011)
Frank Richter [Mon, 26 Aug 2019 19:36:27 +0000 (21:36 +0200)]
tests: Improve CharReaderFailIfExtraTest (#1011)

* There was a nonsensical change of 'failIfExtra' before calling strictMode():
  the latter resets the former.
  Dealt with by having one test with pure strictMode and one with strictMode
  but failIfExtra=false.
* The JSONTEST_ASSERT_STRING_EQUAL tests for the error strings swapped
  the 'expected' and 'actual' values.

4 weeks agochange Value::null to Value::nullSingleton() (#1000)
dota17 [Wed, 14 Aug 2019 05:42:10 +0000 (13:42 +0800)]
change Value::null to Value::nullSingleton() (#1000)

4 weeks agoCleanup versioning strategy relanding (#989) (#997)
Jordan Bayles [Wed, 14 Aug 2019 05:41:43 +0000 (22:41 -0700)]
Cleanup versioning strategy relanding (#989) (#997)

* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....

6 weeks agoRevert "Cleanup versioning strategy (#989)" (#996)
Jordan Bayles [Wed, 31 Jul 2019 18:26:48 +0000 (11:26 -0700)]
Revert "Cleanup versioning strategy (#989)" (#996)

This reverts commit 12325b814f00cc31c6ccdb7a17d058c4dbc55aed.

7 weeks agoCleanup versioning strategy (#989)
Jordan Bayles [Mon, 22 Jul 2019 22:25:23 +0000 (15:25 -0700)]
Cleanup versioning strategy (#989)

* Cleanup versioning strategy

Currently, versioning is a mess. CMake and Meson have seperate build
version number storage locations, with no way of knowing you need to
have both. Plus, due to recent revisions the amalgamate script is broken
unless you build first, and may still be broken afterwards.

This PR fixes some issues with versioning, and adds comments clarifying
what has to be done when doing a release.

* Run clang format

* Update SOVERSION....

8 weeks agoDelete JSONCPP_DEPRECATED, use [[deprecated]] instead. (#978)
dota17 [Wed, 17 Jul 2019 20:35:33 +0000 (04:35 +0800)]
Delete JSONCPP_DEPRECATED, use [[deprecated]] instead. (#978)

* delete JSONCPP_DEPRECATED, use [[deprecated]]

* add pragma warning(disable:4996)

* add error C2416

* update

* update

* update

8 weeks agoImprove code comment formatting (Issue #985)
Billy Donahue [Sun, 14 Jul 2019 22:41:48 +0000 (18:41 -0400)]
Improve code comment formatting (Issue #985)

8 weeks agoFix definition check for GNUC
Jordan Bayles [Fri, 12 Jul 2019 18:07:12 +0000 (11:07 -0700)]
Fix definition check for GNUC

2 months ago\#979 Fix parseFromStream definition 1.9.1
Jordan Bayles [Thu, 11 Jul 2019 01:56:30 +0000 (18:56 -0700)]
\#979 Fix parseFromStream definition

This patch fixes issue #979, where the parseFromStream definition in
the header is different from the implementation.

2 months agoAdd new JSON_USE_NULLREF flag
Jordan Bayles [Thu, 11 Jul 2019 21:27:29 +0000 (14:27 -0700)]
Add new JSON_USE_NULLREF flag

This patch adds a new flag, JSON_USE_NULLREF, which removes
the legacy singletons null, nullRef for consumers that require not
having static initialized globals, like Chromium.

2 months ago\#964 Delete JSONCPP_NORETURN for [[noreturn]]
Jordan Bayles [Tue, 9 Jul 2019 22:03:39 +0000 (15:03 -0700)]
\#964 Delete JSONCPP_NORETURN for [[noreturn]]

This patch removes the custom JSONCPP_NORETURN macro in favor of the
C++11 standard [[noreturn]] attribute.

2 months agopop the root node after readValue()
lilinchao [Tue, 2 Jul 2019 12:28:30 +0000 (20:28 +0800)]
pop the root node after readValue()

2 months agoadjust some codes position 1.9.0
lilinchao [Tue, 2 Jul 2019 13:15:11 +0000 (21:15 +0800)]
adjust some codes position

2 months agoUpdate version.h.in header comments
Jordan Bayles [Mon, 1 Jul 2019 20:06:14 +0000 (13:06 -0700)]
Update version.h.in header comments

Currently, the comments in the version.h.in header file are
incorrect. This tiny patch just updates them.

2 months agoFix comments on Json Reader
Jordan Bayles [Fri, 28 Jun 2019 16:50:46 +0000 (09:50 -0700)]
Fix comments on Json Reader

There have been multiple discussions of the inaccurate comments in the
Json Reader class. This patch just updates those comments.

2 months agoUpdate minimum CMake version requirement
Jordan Bayles [Fri, 28 Jun 2019 17:11:58 +0000 (10:11 -0700)]
Update minimum CMake version requirement

2 months agoIssue #633: Fix issue with maxInt
Jordan Bayles [Fri, 28 Jun 2019 16:34:16 +0000 (09:34 -0700)]
Issue #633: Fix issue with maxInt

This patch is a minor fix to Json::OurReader to properly check against
maxLargestInt, not maxInt. Some cleanup in the decodeNumber method is
included.

2 months agoRun clang-format on the repository
Jordan Bayles [Thu, 27 Jun 2019 19:01:43 +0000 (12:01 -0700)]
Run clang-format on the repository

We currently don't have any checks for clang formatting as part of our
check-in process, this is an incremental patch to get things compliant.

2 months agoAdd fuzz.cpp to jsoncpp_test
Google AutoFuzz Team [Wed, 26 Jun 2019 21:40:59 +0000 (17:40 -0400)]
Add fuzz.cpp to jsoncpp_test

2 months agoUpdate main.cpp
Google AutoFuzz Team [Wed, 26 Jun 2019 21:32:33 +0000 (17:32 -0400)]
Update main.cpp

2 months agoadded fuzz.cpp to macro in main.cpp
Google-Autofuzz [Wed, 26 Jun 2019 21:19:42 +0000 (17:19 -0400)]
added fuzz.cpp to macro in main.cpp

2 months agoUpdate jsontest.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 19:13:53 +0000 (15:13 -0400)]
Update jsontest.cpp

2 months agoUpdate jsontest.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 19:07:31 +0000 (15:07 -0400)]
Update jsontest.cpp

2 months agoUpdate jsontest.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 19:06:19 +0000 (15:06 -0400)]
Update jsontest.cpp

2 months agoUpdate CMakeLists.txt
Google AutoFuzz Team [Mon, 24 Jun 2019 19:00:57 +0000 (15:00 -0400)]
Update CMakeLists.txt

2 months agoUpdate CMakeLists.txt
Google AutoFuzz Team [Mon, 24 Jun 2019 18:50:25 +0000 (14:50 -0400)]
Update CMakeLists.txt

2 months agoUpdate main.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 18:27:36 +0000 (14:27 -0400)]
Update main.cpp

2 months agoUpdate main.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 18:25:00 +0000 (14:25 -0400)]
Update main.cpp

2 months agoUpdate main.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 16:23:05 +0000 (12:23 -0400)]
Update main.cpp

2 months agoAdded include fuzz.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 15:50:28 +0000 (11:50 -0400)]
Added include fuzz.cpp

2 months agoadded llvm
Google AutoFuzz Team [Mon, 24 Jun 2019 15:34:16 +0000 (11:34 -0400)]
added llvm

2 months agofix llvm
Google AutoFuzz Team [Mon, 24 Jun 2019 15:20:37 +0000 (11:20 -0400)]
fix llvm

2 months agoUpdate fuzz.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 14:32:52 +0000 (10:32 -0400)]
Update fuzz.cpp

2 months agoUpdate fuzz.h
Google AutoFuzz Team [Mon, 24 Jun 2019 14:32:37 +0000 (10:32 -0400)]
Update fuzz.h

2 months agoUpdate fuzz.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 14:26:01 +0000 (10:26 -0400)]
Update fuzz.cpp

2 months agoUpdate fuzz.h
Google AutoFuzz Team [Mon, 24 Jun 2019 14:25:29 +0000 (10:25 -0400)]
Update fuzz.h

2 months agoUpdate fuzz.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 14:03:26 +0000 (10:03 -0400)]
Update fuzz.cpp

2 months agoUpdate fuzz.h
Google AutoFuzz Team [Mon, 24 Jun 2019 14:03:06 +0000 (10:03 -0400)]
Update fuzz.h

2 months agoUpdate fuzz.h
Google AutoFuzz Team [Mon, 24 Jun 2019 13:50:41 +0000 (09:50 -0400)]
Update fuzz.h

2 months agoUpdate fuzz.cpp
Google AutoFuzz Team [Mon, 24 Jun 2019 13:50:09 +0000 (09:50 -0400)]
Update fuzz.cpp

2 months agoUpdated fuzz.h
Google AutoFuzz Team [Mon, 24 Jun 2019 13:49:23 +0000 (09:49 -0400)]
Updated fuzz.h

2 months agoUpdated header and fixed the bug
Google AutoFuzz Team [Mon, 24 Jun 2019 13:45:29 +0000 (09:45 -0400)]
Updated header and fixed the bug

2 months agoAdd a simple fuzz test for jsoncpp.
Autofuzz team [Wed, 12 Jun 2019 14:02:05 +0000 (16:02 +0200)]
Add a simple fuzz test for jsoncpp.

2 months agoversion.h : wrong file was deployed, added required include path and
Olivier LIESS [Mon, 3 Jun 2019 10:37:45 +0000 (12:37 +0200)]
version.h : wrong file was deployed, added required include path and

2 months agoextract variable
cmlchen [Tue, 25 Jun 2019 03:26:29 +0000 (11:26 +0800)]
extract variable

2 months agofix compile problem
cmlchen [Fri, 21 Jun 2019 02:23:20 +0000 (10:23 +0800)]
fix compile problem

2 months agouse fpclassify to test a float number is zero or nan
cmlchen [Fri, 21 Jun 2019 01:40:33 +0000 (09:40 +0800)]
use fpclassify to test a float number is zero or nan

2 months agorepair a typo error
chenguoping [Fri, 31 May 2019 06:16:48 +0000 (14:16 +0800)]
repair a typo error

2 months agoIssue 920: Fix android build with casting fix
Jordan Bayles [Mon, 24 Jun 2019 21:48:59 +0000 (14:48 -0700)]
Issue 920: Fix android build with casting fix

This patch removes an unchecked conversion from a 64bit wide type
to a 32bit wide type, fixing a compile error on some platforms.

Issue:920

2 months agoAdd WideString test for Issue #756
Billy Donahue [Mon, 28 May 2018 16:45:01 +0000 (12:45 -0400)]
Add WideString test for Issue #756

2 months agoMerge pull request #955 from baylesj/yaml-cleanups
Jordan Bayles [Tue, 25 Jun 2019 21:56:34 +0000 (14:56 -0700)]
Merge pull request #955 from baylesj/yaml-cleanups

Modernize Travis and Appveyor configs

2 months agoUpdate appveyor to use build images 955/head
Jordan Bayles [Tue, 25 Jun 2019 21:48:40 +0000 (14:48 -0700)]
Update appveyor to use build images

2 months agoUpdate travis scripts
Jordan Bayles [Tue, 25 Jun 2019 21:40:55 +0000 (14:40 -0700)]
Update travis scripts

2 months agoModernize Travis and Appveyor configs
Jordan Bayles [Tue, 25 Jun 2019 21:27:26 +0000 (14:27 -0700)]
Modernize Travis and Appveyor configs

This PR updates the Travis and Appveyor configs to use more recent
toolchain versions, allowing for better C++11 compliance.

2 months agoMerge pull request #932 from oleurodecision/cmake_clean
Jordan Bayles [Tue, 25 Jun 2019 20:59:46 +0000 (13:59 -0700)]
Merge pull request #932 from oleurodecision/cmake_clean

cmake cleanup

2 months agoUpdate issue templates
Jordan Bayles [Mon, 24 Jun 2019 21:40:08 +0000 (14:40 -0700)]
Update issue templates

2 months agoUpdate issue templates
Jordan Bayles [Mon, 24 Jun 2019 21:38:38 +0000 (14:38 -0700)]
Update issue templates

2 months agoMerge pull request #934 from oleurodecision/cmake_config_version
Jordan Bayles [Mon, 24 Jun 2019 21:32:55 +0000 (14:32 -0700)]
Merge pull request #934 from oleurodecision/cmake_config_version

added cmake config version file for proper cmake delivery

2 months agoMerge pull request #953 from baylesj/clang-format
Jordan Bayles [Mon, 24 Jun 2019 21:25:16 +0000 (14:25 -0700)]
Merge pull request #953 from baylesj/clang-format

Run clang format

2 months agoMerge pull request #952 from baylesj/update-meson-req
Jordan Bayles [Mon, 24 Jun 2019 21:08:10 +0000 (14:08 -0700)]
Merge pull request #952 from baylesj/update-meson-req

Update meson build requirement

2 months agoRun clang format 953/head
Jordan Bayles [Mon, 24 Jun 2019 21:06:45 +0000 (14:06 -0700)]
Run clang format

Clang format hasn't been run on some recent checkins. This patch updates
the repository with clang format properly run on all files.

2 months agoUpdate CONTRIBUTING.md
Jordan Bayles [Mon, 24 Jun 2019 21:05:18 +0000 (14:05 -0700)]
Update CONTRIBUTING.md

Added style information.

2 months agoUpdate README.md
Jordan Bayles [Mon, 24 Jun 2019 20:54:28 +0000 (13:54 -0700)]
Update README.md

Separate contributing guidelines into their own separate documentation.

2 months agoCreate CONTRIBUTING.md
Jordan Bayles [Mon, 24 Jun 2019 20:53:55 +0000 (13:53 -0700)]
Create CONTRIBUTING.md

2 months agoUpdate meson build requirement 952/head
Jordan Bayles [Mon, 24 Jun 2019 20:38:00 +0000 (13:38 -0700)]
Update meson build requirement

Currently, we have a build type warning due to listing a requirement for
meson build version that doesn't implement features we use in our build
file. The minimum meson build version required is actually 0.50.0, so
this PR updates our meson.build file to depend on 0.50.0.

2 months agoUpdate AUTHORS
Jordan Bayles [Mon, 24 Jun 2019 20:32:20 +0000 (13:32 -0700)]
Update AUTHORS

2 months agoMerge pull request #935 from abigailbunyan/forward-declarations
Jordan Bayles [Mon, 24 Jun 2019 19:50:59 +0000 (12:50 -0700)]
Merge pull request #935 from abigailbunyan/forward-declarations

Add missing classes to forwards.h

2 months agoFix JSON_USE_EXCEPTION=0 use case
Jordan Bayles [Thu, 6 Jun 2019 20:41:47 +0000 (13:41 -0700)]
Fix JSON_USE_EXCEPTION=0 use case

This patch fixes the JSON_USE_EXCEPTION flag. Currently, due to the
throwRuntimeError and throwLogicError methods implemented in json_value,
even if JSON_USE_EXCEPTION is set to 0 jsoncpp will still throw. This
breaks integration into projects with -fno-exceptions set, such as
Chromium.

3 months agofixed typos 932/head
Olivier LIESS [Mon, 3 Jun 2019 14:28:56 +0000 (16:28 +0200)]
fixed typos

3 months agoAdd missing classes to forwards.h 935/head
Abigail Bunyan [Mon, 3 Jun 2019 14:04:01 +0000 (15:04 +0100)]
Add missing classes to forwards.h

Fixes #904.

3 months agocmake fixes
Olivier LIESS [Mon, 3 Jun 2019 10:35:14 +0000 (12:35 +0200)]
cmake fixes

3 months agoadded cmake config version file for proper cmake delivery 934/head
Olivier LIESS [Mon, 3 Jun 2019 10:39:50 +0000 (12:39 +0200)]
added cmake config version file for proper cmake delivery

4 months agoRename version.md to version.txt
David Demelier [Tue, 23 Apr 2019 09:12:23 +0000 (11:12 +0200)]
Rename version.md to version.txt

4 months agoUse version.md in dev.makefile
David Demelier [Tue, 23 Apr 2019 09:02:28 +0000 (11:02 +0200)]
Use version.md in dev.makefile

4 months agoFix build with libc++, closes #910
David Demelier [Thu, 18 Apr 2019 14:32:13 +0000 (16:32 +0200)]
Fix build with libc++, closes #910

5 months agoExplicitly set JSON_API to 'default' visibility on clang & gcc
Frank Richter [Fri, 22 Mar 2019 09:15:08 +0000 (10:15 +0100)]
Explicitly set JSON_API to 'default' visibility on clang & gcc

5 months agoMerge pull request #901 from res2k/demand
Christopher Dunn [Sat, 30 Mar 2019 14:39:32 +0000 (09:39 -0500)]
Merge pull request #901 from res2k/demand

Implement Value::demand()

5 months agoBump minor version, SOVERSION 901/head
Frank Richter [Sat, 23 Mar 2019 20:03:30 +0000 (21:03 +0100)]
Bump minor version, SOVERSION

5 months agoMerge pull request #902 from res2k/fix-888
Christopher Dunn [Sat, 23 Mar 2019 19:43:56 +0000 (14:43 -0500)]
Merge pull request #902 from res2k/fix-888

Fix #888

5 months agoCast to unsigned char in Value::setType() to appease gcc (issue #888) 902/head
Frank Richter [Sat, 23 Mar 2019 14:04:30 +0000 (15:04 +0100)]
Cast to unsigned char in Value::setType() to appease gcc (issue #888)

5 months agotests: Add a comment
Frank Richter [Sat, 23 Mar 2019 13:39:59 +0000 (14:39 +0100)]
tests: Add a comment

5 months agoImplement Value::demand()
Frank Richter [Sat, 23 Mar 2019 13:31:06 +0000 (14:31 +0100)]
Implement Value::demand()

5 months agoValue::find(): Fix assert message
Frank Richter [Sat, 23 Mar 2019 13:32:00 +0000 (14:32 +0100)]
Value::find(): Fix assert message

5 months agotests: Add small checks for find()
Frank Richter [Sat, 23 Mar 2019 13:16:13 +0000 (14:16 +0100)]
tests: Add small checks for find()

5 months agoUpdate README.md
Willem [Mon, 18 Mar 2019 13:02:50 +0000 (14:02 +0100)]
Update README.md

Update the link to the conan page, as https://conan.io/source/jsoncpp/1.8.0/theirix/ci returns a 404.

6 months agoremove JSON_HAS_RVALUE_REFERENCES
Billy Donahue [Mon, 21 Jan 2019 17:32:31 +0000 (12:32 -0500)]
remove JSON_HAS_RVALUE_REFERENCES

6 months agoVS2013 doesn't allow move ops to be =default
Billy Donahue [Mon, 21 Jan 2019 21:42:25 +0000 (16:42 -0500)]
VS2013 doesn't allow move ops to be =default

6 months agorefactor comments_ into a class
Billy Donahue [Mon, 21 Jan 2019 02:53:01 +0000 (21:53 -0500)]
refactor comments_ into a class

6 months agoMerge pull request #883 from hjmjohnson/remove-msvc2010
Christopher Dunn [Fri, 1 Mar 2019 04:26:50 +0000 (22:26 -0600)]
Merge pull request #883 from hjmjohnson/remove-msvc2010

COMP: Remove build files for unsupported IDE's

6 months agoFix macro redefinition warning with clang-cl
Marcel Raad [Mon, 25 Feb 2019 14:24:03 +0000 (15:24 +0100)]
Fix macro redefinition warning with clang-cl

clang-cl defines _MSC_VER by default, so JSONCPP_DEPRECATED was first
defined for MSVC and then redefined for clang. Integrate the MSVC
definition into the block with clang and GCC's JSONCPP_DEPRECATED
definitions to fix this.

7 months agoCOMP: Remove visual studio specialization in favor of meson or cmake 883/head
Hans Johnson [Thu, 24 Jan 2019 15:57:56 +0000 (09:57 -0600)]
COMP: Remove visual studio specialization in favor of meson or cmake

More robust build environments can be generated from meson
or cmake rather than including those files in every download.

7 months agoCOMP: Remove build files for unsupported IDE's
Hans Johnson [Thu, 24 Jan 2019 15:00:55 +0000 (09:00 -0600)]
COMP: Remove build files for unsupported IDE's

The msvc2010 and vs71 IDE's do not support sufficient
C++11 feature sets for jsoncpp.

Remove these build environments.

resolves: #882

7 months agopack the {type,allocated} bitfield (#876)
Billy Donahue [Mon, 21 Jan 2019 04:59:16 +0000 (23:59 -0500)]
pack the {type,allocated} bitfield (#876)

* pack the {type,allocated} bitfield (Issue#873)
This allows special functions to be implemented more easily.

7 months agoIssue #872: add json/allocator.h in the amalgamated header.
Billy Donahue [Sun, 20 Jan 2019 03:58:02 +0000 (22:58 -0500)]
Issue #872: add json/allocator.h in the amalgamated header.

I don't know why we didn't include this before.
It seems to work fine.

7 months agoapply the C++11 style change in .clang-format
Billy Donahue [Fri, 18 Jan 2019 08:46:57 +0000 (03:46 -0500)]
apply the C++11 style change in .clang-format

7 months agoswitch .clang-format to C++11
Billy Donahue [Fri, 18 Jan 2019 08:45:27 +0000 (03:45 -0500)]
switch .clang-format to C++11

7 months agoBUG: VERSION_LESS_EQUAL introduced in cmake 3.7
Hans Johnson [Fri, 18 Jan 2019 01:25:06 +0000 (19:25 -0600)]
BUG: VERSION_LESS_EQUAL introduced in cmake 3.7

Older versions of cmake, according to documentation:
https://cmake.org/cmake/help/v3.5/command/if.html , do not know
VERSION_LESS_EQUAL, just VERSION_LESS.

This leads to errors:

CMake Error at somewhere/jsoncpp/CMakeLists.txt:18 (if):
  if given arguments:

    "3.5.1" "VERSION_LESS_EQUAL" "3.13.1"

  Unknown arguments specified

Resolves: #866