1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-29 23:01:16 +03:00
Commit Graph

4739 Commits

Author SHA1 Message Date
69c8758d51 fix the abi tests for diagnostics positions feature (#4572) 2024-12-28 16:24:52 +01:00
5ff90d9e02 fix diagnostic positions related compilation errors (#4570) 2024-12-28 16:22:45 +01:00
6be4e85600 Bump cppcheck from 1.4.6 to 1.4.7 in /cmake/requirements (#4567) 2024-12-23 19:17:06 +01:00
663058e7d1 Fix typo in nlohmann_define_derived_type.md (#4565) 2024-12-21 12:53:15 +01:00
af4ad7915c Add ONLY_SERIALIZE for NLOHMANN_DEFINE_DERIVED_TYPE_* macros (#4562) 2024-12-20 11:31:22 +01:00
58f5f25968 json start/end position implementation (#4517)
* Add implementation to retrieve start and end positions of json during parse

* Add more unit tests and add start/stop parsing for arrays

* Add raw value for all types

* Add more tests and fix compiler warning

* Amalgamate

* Fix CLang GCC warnings

* Fix error in build

* Style using astyle 3.1

* Fix whitespace changes

* revert

* more whitespace reverts

* Address PR comments

* Fix failing issues

* More whitespace reverts

* Address remaining PR comments

* Address comments

* Switch to using custom base class instead of default basic_json

* Adding a basic using for a json using the new base class. Also address PR comments and fix CI failures

* Address decltype comments

* Diagnostic positions macro (#4)

Co-authored-by: Sush Shringarputale <sushring@linux.microsoft.com>

* Fix missed include deletion

* Add docs and address other PR comments (#5)

* Add docs and address other PR comments

---------

Co-authored-by: Sush Shringarputale <sushring@linux.microsoft.com>

* Address new PR comments and fix CI tests for documentation

* Update documentation based on feedback (#6)

---------

Co-authored-by: Sush Shringarputale <sushring@linux.microsoft.com>

* Address std::size_t and other comments

* Fix new CI issues

* Fix lcov

* Improve lcov case with update to handle_diagnostic_positions call for discarded values

* Fix indentation of LCOV_EXCL_STOP comments

* fix amalgamation astyle issue

---------

Co-authored-by: Sush Shringarputale <sushring@linux.microsoft.com>
2024-12-18 22:46:14 +01:00
733c59588d Bump actions/upload-artifact from 4.4.3 to 4.5.0 (#4557) 2024-12-18 18:43:22 +00:00
6cb099e30e Suppress modernize-use-integer-sign-comparison (#4558) 2024-12-18 17:44:56 +01:00
094bd2651b Set parents after insert call (#4537)
* 🐛 set parents after insert call

* 🚨 fix warning
2024-12-18 09:44:09 +01:00
30cd44df95 Clean up CI (#4553)
* 💚 overwork cppcheck

* 🔒 adjust permissions

* 💚 fixes

* 💚 fixes
2024-12-17 18:58:05 +01:00
5362012fdd [StepSecurity] ci: Harden GitHub Actions (#4551)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2024-12-17 15:20:06 +01:00
861ec9c3c6 Fix token permissions warnings (#4550)
* 🚨 fix token permissions warnings

* 🚨 fix token permissions warnings

* 🚨 fix token permissions warnings
2024-12-17 12:55:19 +01:00
f4910b20ce Bump mkdocs-material from 9.5.48 to 9.5.49 in /docs/mkdocs (#4548) 2024-12-17 09:50:23 +00:00
f2a4ac0673 Add step to build the documentation (#4549)
* 💚 add step to build the documentation

* 💚 add step to build the documentation
2024-12-17 09:48:24 +01:00
8e1b800017 Move reuse dependency to requirements.txt file (#4547) 2024-12-16 17:25:18 +01:00
677e19e39c Clean up (#4546) 2024-12-16 07:23:35 +01:00
9e23b5d61e ⬆️ Bump watchdog from 2.1.7 to 6.0.0 in /tools/serve_header (#4542) 2024-12-15 22:39:16 +00:00
eb142e33c0 ⬆️ Bump ossf/scorecard-action from 2.3.3 to 2.4.0 (#4545) 2024-12-15 21:54:00 +00:00
1c8e26dcb4 ⬆️ Bump lukka/get-cmake from 3.31.0 to 3.31.2 (#4544) 2024-12-15 21:23:59 +00:00
b6b8378c8c ⬆️ Bump github/codeql-action from 2.27.9 to 3.27.9 (#4543) 2024-12-15 20:55:09 +00:00
58949c0ad5 ⬆️ Bump actions/github-script from 6.4.0 to 7.0.1 (#4540) 2024-12-15 20:13:29 +00:00
7cfbe321be ⬆️ Bump pyyaml from 6.0 to 6.0.2 in /tools/serve_header (#4541) 2024-12-15 20:12:27 +00:00
4003f8da02 [StepSecurity] Apply security best practices (#4539)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2024-12-15 18:31:21 +01:00
6a2ae22a5a 📝 add OpenSSF Scorecard badge 2024-12-15 17:16:26 +01:00
620034ecec ♻️ allow patch and diff to be used with arbitrary string types (#4536) 2024-12-13 07:24:50 +01:00
e6cafa573a 📝 fix CPM.cmake example 2024-12-11 08:31:43 +01:00
e0a17f8475 📝 add more package managers (#4533) 2024-12-10 23:18:39 +01:00
20ae363a71 Replace EOF with char_traits (#4532)
* 📝 update customers

* ♻️ replace EOF with char_traits #2755
2024-12-10 20:51:47 +01:00
589641b175 Add support of multi-dim C-style array member of struct. (#4262)
* Add support of multi-dim C-style array.

* Support up to 4 dimensional array.

* Suppress clang-tidy checks for C-style arrays
2024-12-10 13:18:21 +01:00
f385fe28f2 💸 update sponsors 2024-12-10 11:59:01 +01:00
981a4c39f4 📝 trigger documentation build 2024-12-10 09:41:45 +01:00
dd81f878f7 🚀 fix permissions 2024-12-10 09:39:21 +01:00
549c79ba7e Overwork documentation (#4516) 2024-12-09 23:02:30 +01:00
9f60e85557 Fix return value of get_ptr for unsigned integers (#4525)
* 🐛 fix return value of get_ptr for unsigned integers

* 📝 update documentation
2024-12-06 18:38:25 +01:00
a006a7a48b Add more GCC warning flags (#4524)
* 🔧 add more GCC warning flags

* 👷 use GCC image for GCC test

* 👷 use GCC image for GCC test

* 👷 use GCC image for GCC test

* 👷 use GCC image for GCC test

* 👷 use GCC image for GCC test

* 👷 use GCC image for GCC test

* 👷 use GCC image for GCC test

* 👷 use GCC image for GCC test

* 🔧 adjust flags

* 👷 adjust jobs

* 👷 adjust jobs
2024-12-01 16:13:48 +01:00
1b9a9d1f21 Update licenses (#4521)
* 📄 update licenses

* 📄 update licenses
2024-11-29 17:38:42 +01:00
935c6eeb5a Optimize binary get_number implementation by reading multiple bytes at once (#4391)
* multibyte binary reader

* wide_string_input_adapter fallback to get_character

Update input_adapters.hpp

* Update json.hpp

* Add from msgpack test

* Test for broken msgpack with stream, address some warnings

* Reading binary number from wchar as an error, address warnings

* Not casting float to int, it violates strict aliasing rule
2024-11-29 09:19:58 +01:00
e41905fcb0 💸 thanks @phrrngtn 2024-11-27 18:03:21 +01:00
d333f08958 CMake: generate a pkg-config file that follow pkg-config conventions (#4456)
* CMake: configure pkg-config with @only

And use @ replacement instead of {}, since ${} is significant in
pkg-config's format

* CMake: use conventional prefix and incluedir variables in pkg-config

This is more standard, and has some advantages when cross compiling.
This also means that the pkg-config files generated by Meson and CMake
now match.
2024-11-26 08:39:11 +01:00
3d6c664de2 Allow comparing default initialized iterators (#4512) 2024-11-26 06:35:14 +01:00
ee32bfc1c2 Make SAX output locale-independent (#4505)
* 🐛 make SAX output locale-independent #4084

*  add test

*  add test

*  add test

*  add test

*  add test

*  add test

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084

* 🐛 make SAX output locale-independent #4084
2024-11-24 21:14:00 +01:00
a97041a98f Skip enum tests when JSON_DisableEnumSerialization=ON (#4504)
*  skip enum tests when JSON_DisableEnumSerialization=ON

*  skip enum tests when JSON_DisableEnumSerialization=ON
2024-11-21 17:19:16 +01:00
f9f8c07792 fix: integer parsed as float when EINTR set in errno (#4506)
* fix: integer parsed as float when EINTR set in errno

* chore: make amalgamate

* chore: make pretty

---------

Co-authored-by: Stuart Gorman <Stuart.Gorman@kallipr.com>
2024-11-21 13:09:29 +01:00
378e091795 Fix weak-vtables warning (#4500)
* 🔧 remove warning suppression

* 🚨 fix weak-vtables warning #4087

* 🚨 suppress -Wweak-vtables warning

* 🚨 suppress -Wweak-vtables warning

*  fix test

*  fix test

*  fix test
2024-11-20 08:29:44 +01:00
1f218e1074 Possible fix for #4485 (#4487)
* Possible fix for #4485

Throw's an exception when i is nullptr,
also added a testcase for this scenario though most likely in the wrong test file.cpp

* quick cleanup

* Fix compile issues

* moved tests around, changed exceptions, removed a possibly unneeded include

* add back include <memory> for testing something

* Ninja doesn't like not having a \n, at end of file, adding it back

* update input_adapter file to deal with empty/null file ptr.

* ran make pretty

* added test for inputadapter

* ran make amalgamate

* Update tests/src/unit-deserialization.cpp

Co-authored-by: Niels Lohmann <niels.lohmann@gmail.com>

* Update tests/src/unit-deserialization.cpp

Co-authored-by: Niels Lohmann <niels.lohmann@gmail.com>

* Update input adapters.hpp with new includes

* fix unabigious use of _, (there was a double declare)

* did the amalagamate

* rm duplicate includes

* make amalgamate again

* reorder

* amalgamate

* moved it above

* amalgamate

---------

Co-authored-by: Jordan <jordan-hoang@users.noreply.github.com>
Co-authored-by: Niels Lohmann <niels.lohmann@gmail.com>
2024-11-19 13:54:04 +01:00
64f68dc563 Suppress warnings in NLOHMANN_JSON_SERIALIZE_ENUM (#4497) 2024-11-17 14:29:27 +01:00
1c5923e5d6 Add comment for #4494 (#4496) 2024-11-17 07:36:05 +01:00
e3ac5a64bf Add test for libstdc++ (#4495)
* 👷 add test for libstdc++

* 👷 add test for libstdc++

* 💚 add fixes from #4490

* 💚 add fixes from #4490
2024-11-17 07:35:35 +01:00
e509007df2 Remove alwayslink=True Bazel flag (#4396) 2024-11-16 23:13:11 +01:00
060414037e feat: Rebase feature/optional to develop (#4036)
* 🚧 conversions for std::optional

* 🏁 fix <optional> inclusion

* 💚 overwork tests

* Use JSON_HAS_CPP_17 only after it has been defined

*  update tests

* 🏁 include right <optional> header

* ♻️ do not include experimental headers

* Add missing #endif after rebase

* Fix failing test

* Only define conversion to std::optional when JSON_USE_IMPLICIT_CONVERSION is disabled.

* missing endif

* Remove Wfloat-equal suppress

* amalgamate

* Move include of optional out of macro_scope; probably does not make sense to be there

* Make clang-tidy happy

* Suppress lint instead of changing to 'contains'

---------

Co-authored-by: Niels Lohmann <mail@nlohmann.me>
Co-authored-by: Markus Palonen <markus.palonen@gmail.com>
2024-11-16 17:19:33 +01:00