Jordan Bayles
18f790fbe7
Issue 1021: Fix clang 10 compilation ( #1023 )
...
This patch fixes an implicit long to double conversion, fixing
compilation on the as-of-yet unreleased clang v10.
2019-09-16 12:27:59 -07:00
m-gupta
3013ed48b3
jsoncpp: Define JSON_USE_INT64_DOUBLE_CONVERSION for clang as well. ( #1002 )
...
The current check to define JSON_USE_INT64_DOUBLE_CONVERSION
works for GCC but not clang.
Clang does define __GNUC__ but with a value 4 which misses
the check for >= 6.
This avoids the -Wimplicit-int-float-conversion warning
when jsoncpp is built with a recent version of clang.
Signed-off-by: Manoj Gupta <manojgupta@google.com>
2019-09-16 12:24:13 -07:00
dota17
2cb9a5803e
reinforce readToken function and add simple tests ( #1012 )
2019-09-16 11:25:22 -07:00
Frank Richter
c5cb313ca0
Do not allow tokenError tokens after input if failIfExtra is set. ( #1014 )
...
Currently when failIfExtra is set and strictRoot is not set,
OurReader::parse() will accept trailing non-whitespace after the JSON value
as long as the first token is not a valid JSON token. This commit changes
this to disallow any non-whitespace after the JSON value.
This commit also suppresses the "Extra non-whitespace after JSON value."
error message if parsing was aborted after another error.
2019-09-16 10:41:50 -07:00
dota17
abcd3f7b1f
Modify code comments in write.h ( #987 )
...
* modify code comments in write.h
* update
2019-09-16 10:40:35 -07:00
dota17
d622250c3e
Check the comments array boundry. ( #993 )
...
* check the comments array boundry
* remove empty line
2019-09-16 10:40:09 -07:00
dota17
db61dba885
Improving Code Readability ( #1004 )
2019-09-16 10:35:48 -07:00
dota17
7ef0f9fa5b
[Language Conformance] Use constexpr restriction in jsoncpp ( #1005 )
...
* use constexpr restriction in jsoncpp
* remove TODO comment
2019-09-16 10:33:47 -07:00
dota17
3550a0a939
add some testcases: WriteTest, StreamWriterTest ( #1015 )
2019-09-16 10:32:46 -07:00
Google AutoFuzz Team
21ab82916b
Add dictionary for fuzzing ( #1020 )
2019-09-16 10:30:59 -07:00
dota17
fd940255ce
change the returned value ( #1003 )
2019-08-26 12:47:54 -07:00
aliha
472adb60ee
Fix a coupe of typos ( #1007 )
2019-08-26 12:37:05 -07:00
dota17
c92c87b47d
Add some test cases in ValueTest ( #1010 )
...
* add some test cases in ValueTest
* add some test cases in ValueTest
2019-08-26 12:36:51 -07:00
Frank Richter
b941149a37
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.
2019-08-26 12:36:27 -07:00
dota17
2cf939e8c3
change Value::null to Value::nullSingleton() ( #1000 )
2019-08-13 22:42:10 -07:00
Jordan Bayles
7b28698c5c
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....
2019-08-13 22:41:43 -07:00
Jordan Bayles
0d27381acf
Revert "Cleanup versioning strategy ( #989 )" ( #996 )
...
This reverts commit 12325b814f00cc31c6ccdb7a17d058c4dbc55aed.
2019-07-31 11:26:48 -07:00
Jordan Bayles
12325b814f
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....
2019-07-22 15:25:23 -07:00
dota17
b27c83f691
Delete JSONCPP_DEPRECATED, use [[deprecated]] instead. ( #978 )
...
* delete JSONCPP_DEPRECATED, use [[deprecated]]
* add pragma warning(disable:4996)
* add error C2416
* update
* update
* update
2019-07-17 13:35:33 -07:00
Billy Donahue
483eba84a7
Improve code comment formatting (Issue #985 )
2019-07-17 13:04:53 -07:00
Jordan Bayles
b3507948e2
Fix definition check for GNUC
2019-07-17 13:03:23 -07:00
Jordan Bayles
645250b669
\#979 Fix parseFromStream definition
...
This patch fixes issue #979 , where the parseFromStream definition in
the header is different from the implementation.
1.9.1
2019-07-11 14:38:06 -07:00
Jordan Bayles
25c57812e2
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.
2019-07-11 14:34:51 -07:00
Jordan Bayles
9ef812a097
\#964 Delete JSONCPP_NORETURN for [[noreturn]]
...
This patch removes the custom JSONCPP_NORETURN macro in favor of the
C++11 standard [[noreturn]] attribute.
2019-07-10 18:57:47 -07:00
lilinchao
60ba071aac
pop the root node after readValue()
2019-07-09 16:16:00 -07:00
lilinchao
3c32dca892
adjust some codes position
1.9.0
2019-07-02 13:39:32 -07:00
Jordan Bayles
7924d3ff97
Update version.h.in header comments
...
Currently, the comments in the version.h.in header file are
incorrect. This tiny patch just updates them.
2019-07-01 13:23:53 -07:00
Jordan Bayles
95b3092ce4
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.
2019-06-28 10:25:13 -07:00
Jordan Bayles
f8db40ff83
Update minimum CMake version requirement
2019-06-28 10:24:50 -07:00
Jordan Bayles
44bc38f0a1
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.
2019-06-28 09:43:32 -07:00
Jordan Bayles
ddc9e0fcd7
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.
2019-06-27 12:25:42 -07:00
Google AutoFuzz Team
879a5b80ce
Add fuzz.cpp to jsoncpp_test
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
dc170e30e2
Update main.cpp
2019-06-27 11:58:42 -07:00
Google-Autofuzz
d148e28b9b
added fuzz.cpp to macro in main.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
bcc0472621
Update jsontest.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
c4d1cb1cd1
Update jsontest.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
336c300ca4
Update jsontest.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
400ec89811
Update CMakeLists.txt
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
181f9eb129
Update CMakeLists.txt
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
13afd0e455
Update main.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
caa2f3bf42
Update main.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
fdcd2fc232
Update main.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
92cc77392e
Added include fuzz.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
7e69f15a64
added llvm
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
8e01024ce3
fix llvm
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
6d236e1948
Update fuzz.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
d81a3caece
Update fuzz.h
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
2939d85b84
Update fuzz.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
9725530a4f
Update fuzz.h
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
576b271a04
Update fuzz.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
9d6db96f36
Update fuzz.h
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
46d35659ef
Update fuzz.h
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
29434414d7
Update fuzz.cpp
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
3247202676
Updated fuzz.h
2019-06-27 11:58:42 -07:00
Google AutoFuzz Team
0e3b22dd3a
Updated header and fixed the bug
2019-06-27 11:58:42 -07:00
Autofuzz team
786851819e
Add a simple fuzz test for jsoncpp.
2019-06-27 11:58:42 -07:00
Olivier LIESS
629a727b5f
version.h : wrong file was deployed, added required include path and
2019-06-26 09:05:34 -07:00
cmlchen
c51d718ead
extract variable
2019-06-26 09:03:12 -07:00
cmlchen
7c7ccbf934
fix compile problem
2019-06-26 09:03:12 -07:00
cmlchen
b7feb2d493
use fpclassify to test a float number is zero or nan
2019-06-26 09:03:12 -07:00
chenguoping
5510f14a71
repair a typo error
2019-06-25 15:16:16 -07:00
Jordan Bayles
d34479ec34
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
2019-06-25 15:14:53 -07:00
Billy Donahue
dd6921f479
Add WideString test for Issue #756
2019-06-25 15:14:01 -07:00
Jordan Bayles
101d4797db
Merge pull request #955 from baylesj/yaml-cleanups
...
Modernize Travis and Appveyor configs
2019-06-25 14:56:34 -07:00
Jordan Bayles
2690bc9a9a
Update appveyor to use build images
2019-06-25 14:48:40 -07:00
Jordan Bayles
c84f2e19c9
Update travis scripts
2019-06-25 14:40:55 -07:00
Jordan Bayles
408b466b57
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.
2019-06-25 14:27:26 -07:00
Jordan Bayles
2a3ae0e79f
Merge pull request #932 from oleurodecision/cmake_clean
...
cmake cleanup
2019-06-25 13:59:46 -07:00
Jordan Bayles
2d211de06e
Update issue templates
2019-06-24 14:40:08 -07:00
Jordan Bayles
18e51e23fd
Update issue templates
2019-06-24 14:38:38 -07:00
Jordan Bayles
56c41fbd88
Merge pull request #934 from oleurodecision/cmake_config_version
...
added cmake config version file for proper cmake delivery
2019-06-24 14:32:55 -07:00
Jordan Bayles
4babd12a25
Merge pull request #953 from baylesj/clang-format
...
Run clang format
2019-06-24 14:25:16 -07:00
Jordan Bayles
6935317d84
Merge pull request #952 from baylesj/update-meson-req
...
Update meson build requirement
2019-06-24 14:08:10 -07:00
Jordan Bayles
d5bd1a7716
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.
2019-06-24 14:06:45 -07:00
Jordan Bayles
f7182a0fdc
Update CONTRIBUTING.md
...
Added style information.
2019-06-24 14:05:18 -07:00
Jordan Bayles
be4dc51c1f
Update README.md
...
Separate contributing guidelines into their own separate documentation.
2019-06-24 13:54:28 -07:00
Jordan Bayles
12461e5bf1
Create CONTRIBUTING.md
2019-06-24 13:53:55 -07:00
Jordan Bayles
185dfd592d
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.
2019-06-24 13:38:00 -07:00
Jordan Bayles
518875d2ea
Update AUTHORS
2019-06-24 13:32:20 -07:00
Jordan Bayles
3e4c8f8f1d
Merge pull request #935 from abigailbunyan/forward-declarations
...
Add missing classes to forwards.h
2019-06-24 12:50:59 -07:00
Jordan Bayles
83cc92161b
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.
2019-06-21 18:16:52 -05:00
Olivier LIESS
85f5b1c8f9
fixed typos
2019-06-03 16:31:07 +02:00
Abigail Bunyan
1234f4227b
Add missing classes to forwards.h
...
Fixes #904 .
2019-06-03 15:04:01 +01:00
Olivier LIESS
8d2095af3c
cmake fixes
2019-06-03 12:45:24 +02:00
Olivier LIESS
0155f38b5b
added cmake config version file for proper cmake delivery
2019-06-03 12:39:50 +02:00
David Demelier
5b91551f39
Rename version.md to version.txt
2019-04-24 23:56:30 -05:00
David Demelier
27290cf81d
Use version.md in dev.makefile
2019-04-24 23:56:30 -05:00
David Demelier
27b9501683
Fix build with libc++, closes #910
2019-04-24 23:56:30 -05:00
Frank Richter
b16abf8ce1
Explicitly set JSON_API to 'default' visibility on clang & gcc
2019-04-08 18:08:25 -05:00
Christopher Dunn
cd1121290a
Merge pull request #901 from res2k/demand
...
Implement Value::demand()
2019-03-30 09:39:32 -05:00
Frank Richter
69402d1fbb
Bump minor version, SOVERSION
2019-03-23 21:03:30 +01:00
Christopher Dunn
3e2f8d3ea8
Merge pull request #902 from res2k/fix-888
...
Fix #888
2019-03-23 14:43:56 -05:00
Frank Richter
99a99d4032
Cast to unsigned char in Value::setType() to appease gcc (issue #888 )
2019-03-23 15:04:30 +01:00
Frank Richter
9a629bc5e1
tests: Add a comment
2019-03-23 14:39:59 +01:00
Frank Richter
d76fe5687d
Implement Value::demand()
2019-03-23 14:32:13 +01:00
Frank Richter
eb7bd9546e
Value::find(): Fix assert message
2019-03-23 14:32:13 +01:00
Frank Richter
0adb053294
tests: Add small checks for find()
2019-03-23 14:16:13 +01:00
Willem
863aa36165
Update README.md
...
Update the link to the conan page, as https://conan.io/source/jsoncpp/1.8.0/theirix/ci returns a 404.
2019-03-20 00:12:33 -05:00
Billy Donahue
9a55d22d3d
remove JSON_HAS_RVALUE_REFERENCES
2019-03-01 06:32:18 -06:00
Billy Donahue
00558b38db
VS2013 doesn't allow move ops to be =default
2019-03-01 06:31:58 -06:00