Commit Graph

1447 Commits

Author SHA1 Message Date
Jens Mertelmeyer
dca8a24cf8
Fix comparison warnings caused by 54fc4e2 (#1575)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-12-04 22:28:16 -08:00
Markus Mützel
3f86349128
Fix name of static library when targeting MinGW. (#1579)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-12-02 23:19:05 -08:00
Alexandre Detiste
2b3815c90d
the cgi module was removed from Python3.13 (#1578) 2024-12-02 23:00:25 -08:00
Rui Chen
bd25fc5ea0
fix(build): remove check_required_components for meson build (#1570)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-09-30 15:23:00 -07:00
Jacek Galowicz
8214f717e7
Fix typo in JSONCPP_USE_SECURE_MEMORY vs JSONCPP_USING_SECURE_MEMORY (#1567) 2024-09-12 10:58:39 -07:00
Pavel Tsynk
07e3d1b076
Fix deallocate for working on old compiers (#1478)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-11 17:43:25 -07:00
Jordan Bayles
871f0cc43b
Release 1.9.6 and move versions to 1.9.7 (#1566)
* Release 1.9.6 and move versions to 1.9.7

This patch updates versions to be for version 1.9.7.

* remove log.txt
2024-09-11 17:01:27 -07:00
YaalLek
54fc4e28ed
json_value.cpp bug in the edges of uint/int (#1519)
* json_value.cpp bug in the edges of uint/int

Fixing bug of sending a number that is a bit bigger than max<uint64_t> it returns 0:
https://stackoverflow.com/questions/77261400/jsoncpp-do-not-protect-from-uint64-overflow-and-have-weird-behavior/77261716#77261716

* Update json_value.cpp

Fixing bug of sending a number that is a bit bigger than max<uint64_t> it returns 0: https://stackoverflow.com/questions/77261400/jsoncpp-do-not-protect-from-uint64-overflow-and-have-weird-behavior/77261716#77261716

* Update test cases

* json_value.cpp bug in the edges of uint/int

Fixing bug of sending a number that is a bit bigger than max<uint64_t> it returns 0:
https://stackoverflow.com/questions/77261400/jsoncpp-do-not-protect-from-uint64-overflow-and-have-weird-behavior/77261716#77261716

* Run clang tidy

---------

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-11 16:53:22 -07:00
Paolo Monteverde
76ff1db84d
Fixes PreventInSourceBuilds.cmake to work with add_subdirectory (#1383)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-11 16:47:59 -07:00
Scotty1701
89e2973c75
Don't use build dir build interfaces (#1419)
Do not export a location in the build directory as a build interface.
This location is not created until the build step is run and can
interfere with the CMake configuration step if including in another
project.

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:18:29 -07:00
Timofey
7f36cdb3ea
Added Value::find with String key (#1467)
* Added Value::find with String key

* Fix codestyle

---------

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
Co-authored-by: Petukhov Timofey <Timofey.Petukhov@infotecs.ru>
2024-09-09 20:14:36 -07:00
zeroxia
2067f66d66
cmake export configuration: allow repeating find_package(jsoncpp) calls (#1491)
In jsoncpp-namspaced-targets.cmake, it creates JsonCpp::JsonCpp imported
library without first checking whether it was already created by former
call to find_package(JsonCpp).  As CMake allows repeated call to
find_package(), the error of "another target with the same name already
exists" should be fixed.

Co-authored-by: xiazuoling.xzl <xiazuoling.xzl@alibaba-inc.com>
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:14:17 -07:00
Alex Beregszaszi
3aa1192a00
Introduce CharReaderBuilder::ecma404Mode (#1333)
* Introduce CharReaderBuilder::ecma404Mode

* Bump micro version

---------

Co-authored-by: Jordan Bayles <jophba@chromium.org>
Co-authored-by: Billy Donahue <BillyDonahue@users.noreply.github.com>
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:11:44 -07:00
Rudi Heitbaum
99e8ca69b1
meson.build: fix the version number (#1432)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:09:10 -07:00
Kerem TAN
162ead383d
include/json/value.h is changed (#1462)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:08:55 -07:00
Woodrow Douglass
4b1bd4405e
Create a jsoncppConfig.cmake file, even if building under meson (#1486)
* Create a jsoncppConfig.cmake file, even if building under meson

* Hardcode many fewer things in the meson-generated cmake files

* use join_paths for constructing paths in the output Config.cmake

---------

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:08:12 -07:00
matthieugleg
f459022786
Update CMakeLists.txt (#1528)
Remove build directory from include

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:06:22 -07:00
Roelof Oomen
fa0dff18fd
Protect target JsonCpp::JsonCpp against multi-include (#1435)
* Protect target JsonCpp::JsonCpp against multi-include

Fixes #1356

* Simplify (@BillyDonahue)

---------

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:02:24 -07:00
Bartosz Brachaczek
48d2e106a7
Opportunistically take advantage of C++20 move-in/out-of stringstream (#1457)
* Opportunistically take advantage of C++20 move-out-of stringstream

* Opportunistically take advantage of C++20 move-in/out-of stringstream

---------

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 20:00:06 -07:00
Lars Müller
2072e2b4e3
Use current source / binary dir when assuring out of source builds (#1527)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 19:56:37 -07:00
jedav
fdb529bd06
Move removeIndex's result instead of copying (#1516)
Currently removeIndex copies the removed value into removed and then
destructs the original, which can cause significant performance overhead.

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 19:53:56 -07:00
Jordan Bayles
8d1ea7054f
Update cmake.yml 2024-09-09 19:07:04 -07:00
Jordan Bayles
d13801e832
Update meson.yml (#1564) 2024-09-09 19:06:30 -07:00
Jordan Bayles
d791737ccd
Create cmake.yml (#1563)
* Create cmake.yml

* Update cmake.yml

* Update cmake.yml
2024-09-09 19:05:11 -07:00
SpaceIm
a4a083c307
remove ccache micro management (#1448)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 18:57:51 -07:00
Pedro Kaj Kjellerup Nacht
62f7f3efe6
Add security policy (#1484)
Signed-off-by: Pedro Kaj Kjellerup Nacht <pnacht@google.com>
2024-09-09 18:53:23 -07:00
Kapandaria
742c645ab3
Update readFromString.cpp (#1477)
Print the error to screen

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 18:51:35 -07:00
Pavel Tsynk
31754ce2e2
Fixed setting JSONCPP_USE_SECURE_MEMORY definition (#1479)
* Fixed setting JSONCPP_USE_SECURE_MEMORY definition

* fix indent

* Fix passing from command line

* simplified definition

---------

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 18:51:11 -07:00
Pavel Tsynk
483f1c310e
Fix compile on windows with clang (#1480)
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 18:50:38 -07:00
martinduffy1
c04c0c2131
CharReader: Add StructuredError (#1409)
* CharReader: Add Structured Error

Add getStructuredError to CharReader

* run clang format

---------

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
Co-authored-by: Jordan Bayles <jophba@chromium.org>
2024-09-09 18:48:54 -07:00
NotWearingPants
c857395951
Update link in amalgamate.py (#1335) 2024-09-09 18:43:32 -07:00
Timo Röhling
d39b0dff0c
Bump CMake policy version to avoid deprecation warning (#1499)
Starting with CMake 3.27, there will be a warning for compat levels
below CMake 3.5.

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 18:42:54 -07:00
Andrea Pappacoda
fd1abe4cca
build(meson): use find_program('python3') (#1386)
If you really want to be sure to always find python3 when running Meson (and not some other implementation like [Muon](https://muon.build)) it is a bit better to use `find_program('python3')`, as described in https://mesonbuild.com/Reference-manual_functions.html#find_program : "if the "python3" program is requested and it is not found in the system, Meson will return its current interpreter

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 18:42:23 -07:00
Jordan Bayles
badbbc7185
Update clang-format.yml 2024-09-09 18:35:49 -07:00
Jordan Bayles
caf5fb0742
Update meson.yml (#1562) 2024-09-09 18:35:36 -07:00
Jordan Bayles
57de64bf69
Add code coverage (#1561)
* Add code coverage

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml
2024-09-09 18:29:28 -07:00
Jordan Bayles
78893d3961
Update clang-format.yml 2024-09-09 18:19:48 -07:00
Philip Top
034976a19d
add a valueToQuotedString overload (#1397)
* add a valueToQuotedString overload to take a string length to support things like a string_view more directly.

* Apply suggestions from code review

Co-authored-by: Billy Donahue <BillyDonahue@users.noreply.github.com>

---------

Co-authored-by: Billy Donahue <BillyDonahue@users.noreply.github.com>
Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 17:38:22 -07:00
vslashg
e1a3c64fef
Fix asserts in Value::setComment (#1445)
The existing asserts seem to not be what was intended; they appear to have been mistranslated in pull/877.

The first assert for `comment.empty()` was previously a check that a provided `const char*` parameter was not null.  The function this replaced accepted empty strings, and the if() statement at the start of this function handles them.

The second assert for `comment[0] == '\0'` was written when `comment` was a `const char*`, and was testing for empty c-string input.  This PR replaces it with `comment.empty()` to match the original intent.

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 17:34:55 -07:00
vslashg
3c2205cd97
Fix out-of-bounds read. (#1503)
getLocationLIneAndColumn would read past the end of the provided buffer if generating an error message at the end of the stream, if the final character was `\r`.

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 17:32:17 -07:00
vslashg
0a9b9d9c6e
Fix a parser bug where tokens are misidentified as commas. (#1502)
* Fix a parser bug where tokens are misidentified as commas.

In the old and new readers, when parsing an object, a comment
followed by any non-`}` token is treated as a comma.

The new unit test required changing the runjsontests.py
flag regime so that failure tests could be run with default settings.

* Honor allowComments==false mode.

Much of the comment handling in the parsers is bespoke, and does not
honor this flag.  By unfiying it under a common API, the parser is
simplified and strict mode is now more correctly strict.

Note that allowComments mode does not allow for comments in
arbitrary locations; they are allowed only in certain positions.
Rectifying this is a bigger effort, since collectComments mode requires
storing the comments somewhere, and it's not immediately clear
where in the DOM all such comments should live.

---------

Co-authored-by: Jordan Bayles <bayles.jordan@gmail.com>
2024-09-09 17:30:16 -07:00
Jordan Bayles
c3a986600f
Update clang-format.yml 2024-09-09 17:19:14 -07:00
Jordan Bayles
073ad7e96e
Update meson.yml 2024-09-09 17:19:04 -07:00
Jordan Bayles
65d92a4313
Update meson.yml (#1554)
* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

Switch to clang-format-check

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

Add multilple OSes

* Update meson.yml

Add ninja version

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml

* Update meson.yml
2024-09-09 17:10:48 -07:00
Jordan Bayles
ccea7db6c3
Clang format updates (#1560)
* add comment space directive

* Fix clang format issue

* wrap in clang-format off
2024-09-09 17:07:11 -07:00
Jordan Bayles
4290915354
Update clang-format.yml 2024-09-09 16:56:02 -07:00
Jordan Bayles
cc28be0590
Update clang-format.yml 2024-09-09 16:54:56 -07:00
Jordan Bayles
255ebc54af
Create clang-format.yml 2024-09-09 16:52:59 -07:00
Jordan Bayles
c8166ddf1c
add comment space directive (#1558) 2024-09-09 16:30:33 -07:00
Jordan Bayles
73c94501ed
Delete .travis_scripts directory (#1556) 2024-09-09 15:50:39 -07:00