Niels Lohmann
2566828ed5
Fix CI ( #4954 )
...
* 🚨 suppress readability-redundant-parentheses
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress google-runtime-float
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress bugprone-throwing-static-initialization
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress bugprone-throwing-static-initialization
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress bugprone-throwing-static-initialization
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress bugprone-throwing-static-initialization
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress bugprone-throwing-static-initialization
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🗑️ do not use macos-13 image
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ use more Xcode versions
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ fix Clang build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🔨 clean up
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-10-22 11:14:01 +02:00
Niels Lohmann
30d27df61c
Fix CI ( #4871 )
...
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 fix CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-07-31 20:10:57 +02:00
Niels Lohmann
cf16c5ab9f
Use binary_t::value_type ( #4805 )
2025-06-02 06:35:27 +02:00
Niels Lohmann
b19f058465
Encode infinity and NaN as float for MsgPack and CBOR ( #4802 )
...
* 🚸 encode infinity and NaN as float for MsgPack and CBOR
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-06-01 18:50:14 +02:00
Niels Lohmann
828c891427
Extend type_name() to invalid type ( #4786 )
...
* ✅ add regression test
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 💚 fix build
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 📝 add comment
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-05-16 18:16:47 +02:00
Niels Lohmann
e02de2f971
Update to Doctest 2.4.12 ( #4771 )
...
* ⬆️ Doctest 2.4.12
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-05-15 19:25:27 +02:00
Niels Lohmann
6b9199382b
Add missing header ( #4763 )
...
* 🐛 add missing header
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warning
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warning
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-27 18:18:57 +02:00
Niels Lohmann
88c92e605c
Fix compilation failure and warnings with NVHPC ( #4744 )
...
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ enable ranges support
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🔥 remove ci_nvhpc job
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ enable ranges support
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🔥 remove ci_nvhpc job
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warning
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-16 16:09:21 +02:00
Niels Lohmann
96c1b52f1c
Fix conversion to std::optional ( #4742 )
...
* ⚗️ remove JSON_USE_IMPLICIT_CONVERSIONS check for from_json(json, std::optional)
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ remove JSON_USE_IMPLICIT_CONVERSIONS check for from_json(json, std::optional)
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ remove JSON_USE_IMPLICIT_CONVERSIONS check for from_json(json, std::optional)
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ remove JSON_USE_IMPLICIT_CONVERSIONS check for from_json(json, std::optional)
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ remove JSON_USE_IMPLICIT_CONVERSIONS check for from_json(json, std::optional)
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⚗️ add C++ standard library as matrix option
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ⏪ remove inline
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-15 16:10:39 +02:00
Niels Lohmann
1705bfe914
🔖 set version to 3.12.0 ( #4727 )
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-11 10:41:14 +02:00
Niels Lohmann
b477d2b95e
Suppress clang-analyzer-webkit.NoUncountedMemberChecker ( #4701 )
...
* 🚨 suppress clang-analyzer-webkit.NoUncountedMemberChecker
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 📝 add Clang 20/21
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 suppress invalid misc-const-correctness warnings
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-03-29 09:38:45 +01:00
Niels Lohmann
0b6881a95f
Add regression test for #3810 ( #4608 )
...
* ✅ add regression test for #3810
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ✅ add regression test for #3810
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ✅ add regression test for #3810
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ✅ add regression test for #3810
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ✅ add regression test for #3810
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-02-15 12:24:06 +01:00
Niels Lohmann
f06604fce0
Bump the copyright years ( #4606 )
...
* 📄 bump the copyright years
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 📄 bump the copyright years
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 📄 bump the copyright years
Signed-off-by: Niels Lohmann <niels.lohmann@gmail.com >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
Signed-off-by: Niels Lohmann <niels.lohmann@gmail.com >
2025-01-19 17:04:17 +01:00
Michael Valladolid
bdb8d2b7b3
Serialize empty tuple into '[]' instead of null ( #4594 )
...
Signed-off-by: Michael Valladolid <mikevalladolid@gmail.com >
2025-01-18 20:34:11 +01:00
Sushrut Shringarputale
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
Niels Lohmann
1b9a9d1f21
Update licenses ( #4521 )
...
* 📄 update licenses
* 📄 update licenses
2024-11-29 17:38:42 +01:00
Niels Lohmann
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
Niels Lohmann
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
Niels Lohmann
1825117e63
Another desperate try to fix the CI ( #4489 )
...
* 🚨 fix warning
* 💚 update actions
* 🚨 fix warning
* 🚨 fix warning
* 🚨 fix warning
* 💚 update actions
* 💚 update actions
* 🚨 fix warning
* 🚨 fix warning
* 💚 update actions
* 🚨 fix warning
* 💚 update actions
* 💚 update actions
* 💚 update actions
* 🚨 fix warning
* 🚨 fix warning
* 🚨 fix warning
* 🚨 fix warning
* 💚 update actions
* 💚 update actions
* 🚨 fix warning
* 💚 update actions
* 💚 update actions
* 💚 update actions
* 💚 update actions
* 💚 update actions
2024-11-13 10:21:26 +01:00
laterlaugh
97f0bdaf9a
chore: fix some typos in comments ( #4345 )
...
chore: fix some typos in comments
Signed-off-by: laterlaugh <manziwenzhai@sina.cn >
2024-04-12 15:20:18 +02:00
Niels Lohmann
c35d260c2f
Suppress Clang-Tidy warnings ( #4276 )
2024-01-28 14:04:07 +01:00
Niels Lohmann
9cca280a4d
JSON for Modern C++ 3.11.3 ( #4222 )
2023-11-28 22:36:31 +01:00
Niels Lohmann
f56c6e2e30
Update documentation for the next release ( #4216 )
2023-11-26 15:51:19 +01:00
Sergei Trofimovich
6cec5aefc9
custom allocators: define missing 'rebind' type ( #3895 )
2023-03-08 12:31:56 +01:00
Raphael Grimm
233d233439
Fix CI issues ( #3906 )
...
Co-authored-by: barcode <barcode@example.com >
2023-01-31 19:23:37 +01:00
Niels Lohmann
58bd97e2b1
Add clang-tools to required tools for ci_static_analysis_clang ( #3724 )
...
* 💚 add clang-tools to required tools for ci_static_analysis_clang
* 🚨 update Clang-Tidy warning selection
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings
* 🚨 fix Clang-Tidy warnings (#3738 )
* ⏪ revert fix
* ⏪ revert fix
* 🚨 fix Clang-Tidy warnings (#3739 )
Co-authored-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com >
2022-09-13 12:58:26 +02:00
Niels Lohmann
9d69186291
🔖 set version to 3.11.2
2022-08-12 15:04:06 +02:00
Niels Lohmann
f2020da0dd
🔖 set version to 3.11.1
2022-08-01 23:27:58 +02:00
Florian Albrechtskirchinger
cbaf1033be
Fix global UDLs ( #3646 )
...
* Add ci_test_noglobaludls to CI
* Really default JSON_GLOBAL_UDLS to 1
* Test global UDLs
* Suppress warnings
* Clarify documentation
2022-08-01 22:42:35 +02:00
Niels Lohmann
ce0e13ccea
🔖 set version to 3.11.0
2022-07-31 23:19:06 +02:00
Florian Albrechtskirchinger
9aafcbe965
Move UDLs out of the global namespace ( #3605 )
...
* Move UDLs into nlohmann::literals::json_literals namespace
* Add 'using namespace' to unit tests
* Add 'using namespace' to examples
* Add 'using namespace' to README
* Move UDL mkdocs pages out of basic_json/
* Update documentation
* Update docset index
* Add JSON_GlobalUDLs CMake option
* Add unit test
* Build examples without global UDLs
* Add CI target
2022-07-31 17:38:52 +02:00
Florian Albrechtskirchinger
19e4c2bda0
Add regression tests for #3204 and #3333 ( #3629 )
2022-07-31 07:21:48 +02:00
Florian Albrechtskirchinger
d909f80960
Add versioned, ABI-tagged inline namespace and namespace macros ( #3590 )
...
* Add versioned inline namespace
Add a versioned inline namespace to prevent ABI issues when linking code
using multiple library versions.
* Add namespace macros
* Encode ABI information in inline namespace
Add _diag suffix to inline namespace if JSON_DIAGNOSTICS is enabled, and
_ldvcmp suffix if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON is enabled.
* Move ABI-affecting macros into abi_macros.hpp
* Move std_fs namespace definition into std_fs.hpp
* Remove std_fs namespace from unit test
* Format more files in tests directory
* Add unit tests
* Update documentation
* Fix GDB pretty printer
* fixup! Add namespace macros
* Derive ABI prefix from NLOHMANN_JSON_VERSION_*
2022-07-30 21:59:13 +02:00
Niels Lohmann
527da54dcb
Use REUSE framework ( #3546 )
...
* 📄 add licenses
* 👷 add REUSE compliance check
* 📝 add badge for REUSE
Co-authored-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com >
2022-07-20 12:38:07 +02:00
Florian Albrechtskirchinger
39e27684ea
Use DOCTEST_* compiler macros and suppress pragmas warning ( #3550 )
...
Use DOCTEST_* macros in place of predefined compiler macros for compiler
detection and version checks.
The suppression of warning -Wrange-loop-construct in unit-items.cpp
causes GCC<11 to warn about pragmas. Suppressed by adding a version
check.
2022-06-21 16:57:47 +02:00
Florian Albrechtskirchinger
6b97599a27
Fix C++20/gcc-12 issues (Part 2) ( #3446 )
...
* Add C++20 3-way comparison operator and fix broken comparisons
Fixes #3207 .
Fixes #3409 .
* Fix iterators to meet (more) std::ranges requirements
Fixes #3130 .
Related discussion: #3408
* Add note about CMake standard version selection to unit tests
Document how CMake chooses which C++ standard version to use when
building tests.
* Update documentation
* CI: add legacy discarded value comparison
* Fix internal linkage errors when building a module
2022-05-29 13:08:06 +02:00
Florian Albrechtskirchinger
bdc21ad1a7
Add build step for ICPC (with fixes) ( #3465 )
...
* ⬆️ Doctest 2.4.7
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* ⬇️ downgrade to Doctest 2.4.6
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 👷 add CI step for ICPC
* 🔇 suppress warning #2196 : routine is both "inline" and "noinline"
* Re-enable <filesystem> detection on ICPC
* Limit regression test for #3070 to Clang and GCC >=8.4
* Disable deprecation warnings on ICPC
* Disable regression test for #1647 on ICPC (C++20)
* Fix compilation failure of regression test for #3077 on ICPC
* Disable wstring unit test on ICPC
Fixes:
error 913: invalid multibyte character sequence
* Add ICPC to README
Co-authored-by: Niels Lohmann <mail@nlohmann.me >
2022-05-01 22:46:45 +02:00
Niels Lohmann
b21c345179
Reorganize directories ( #3462 )
...
* 🚚 move files
* 🚚 rename doc folder to docs
* 🚚 rename test folder to tests
2022-05-01 09:41:50 +02:00