* Added emitUTF8 setting to emit UTF8 format JSON.
* Added a test for emitUTF8, with it in default, on and off states.
* Review comments addressed.
* Merged master into my branch & resolved conflicts.
* Fix clang-format errors.
* Fix clang-format errors.
* Fixed clang-format errors.
* Fixed clang-format errors.
We desire for jsoncpp to compile and be readily available
with older versions of cmake. The use of newer cmake
commands requires conditional statements so that older
strategies can be used with older versions of cmake.
Resolves: #1018
* [clang-tidy] Add explicit to single argument constructor
Found with hicpp-explicit-conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Fix mismatching declaration
Found with readability-inconsistent-declaration-parameter-name
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Replace {} with = default
Found with modernize-use-equals-default
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Remove redundant .c_Str
Found with readability-redundant-string-cstr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Simplify boolean expressions
Found with readability-simplify-boolean-expr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Use std::move
Found with modernize-pass-by-value
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Uppercase literal suffixes
Found with hicpp-uppercase-literal-suffix
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* Fix fuzzer off by one error
Currently the fuzzer has an off by one error, as it passing a bad length
to the CharReader::parse method, resulting in a heap buffer overflow.
* Rebase master, rerun clang format
* add testcases for writerTest
* update StyledWriterTest, StyledStreamWriterTest and StreamWriterTest
* run clang-format
* add FastWriter Test
* Improve Coverage to 90+%
* Issue #958: Travis CI should enfore clang-format standards
This patch adds clang format support to the travis bots.
* Update path
* Roll back to version 8 since 9 is in test
* Cleanup clang
* Revert "Delete JSONCPP_DEPRECATED, use [[deprecated]] instead. (#978)" (#1029)
This reverts commit b27c83f691a03f521a1b3b99eefa2973f8e2bfcd.
This patch fixes a build issue on CMake, presumably due to the new glibc
having a features.h include file. This patch renames our features.h file
to avoid a name collision.
* [clang-tidy] Replace C typedef with C++ using
Found with modernize-use-using
Added to .clang-tidy file.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Remove redundant member init
Found with readability-redundant-member-init
Added to .clang-tidy
* [clang-tidy] Replace C casts with C++ ones
Found with google-readability-casting
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Use default member init
Found with modernize-use-default-member-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* update example directory
* modify some compile error.
* update with clang-format
* update
* update
* add_definitions("../include/json")
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Wed Jul 10 21:26:16 2019 +0800
#
# On branch code_example
# Your branch is up-to-date with 'origin/code_example'.
#
# Changes to be committed:
# modified: example/CMakeLists.txt
#
* change CMakeLists.txt
* update streamWrite.cpp
* update
* Update readFromStream.cpp
* fix typo
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>
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.
* 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.
* 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....
* 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....