* [clang-tidy] Do not use else after return
Found with readability-else-after-return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Convert several loops to be range based
Found with modernize-loop-convert
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Replace deprecated C headers
Found with modernize-deprecated-headers
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* [clang-tidy] Use auto where applicable
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
* .clang-tidy: Add these checks
* Modernize meson.build
* Make tests optional
* Use `files()` for quick sanity checks
* Bump version to 1.9.3
* Bump SOVERSION, as some functions were removed
and structs were changed, as determined by
libabigail.
This bug is only affects platforms where `char` is unsigned.
When char is a signed type, values >= 0x80 are also considered < 0,
and hence require escaping due to the < ' ' condition.
When char is an unsigned type, values >= 0x80 match none of the
conditions and are considered safe to emit without escaping.
This shows up as a test failure:
* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
/build/source/src/test_lib_json/main.cpp(3370): expected == result
Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
'
Actual : '["\"","\\","\b","\f","\n","\r","\t","ɸ","𤭢"]
'
* Add option JSONCPP_WITH_EXAMPLE
Allows to conditionally build examples as
it has been done for tests. Useful for packaging.
* Do not build example by default
CPPTL support is no longer relevant to JsonCpp, and can be removed from
the library. This patch removes all mentions of CPPTL, by removing all
definitions and code sections conditionally compiled only when JsonCpp
is used with CPPTL. Include guards are also renamed to not refer to
CPPTL where appropriate.
jsoncpp/src/test_lib_json/main.cpp:2261:30: warning: declaration shadows a local variable [-Wshadow]
Json::StyledStreamWriter writer;
^
jsoncpp/src/test_lib_json/main.cpp:2237:28: note: previous declaration is here
Json::StyledStreamWriter writer;
^
```
DEPRECATION: Project targetting '>= 0.41.1' but tried to use feature deprecated since '0.48.0': python3 module
Build targets in project: 3
WARNING: Deprecated features used:
* 0.48.0: {'python3 module'}
```
* 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+%