Niels Lohmann
f8eee1bb79
Annotate unreachable comment-scanner switch paths to satisfy C26819 ( #5071 )
2026-02-07 09:15:18 +01:00
EALePain
25f48639c7
Reference tuple from json ( #5016 )
...
* Add reference handling to tuples
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
* Remove template template type because pair isn't working
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
* amalgamate std::tie changes
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
* allow the elation of a move by removing the ref requirement
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
* force all number_xxx_t to be interchangeable
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
* Finally got amalgamate to work correctly
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
* remove const version, add a test case for scrambled number representations.
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
* Use the logical set of requirements instead of decltype because VS 2015 doesn't like it
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
---------
Signed-off-by: Evelyn LePain <ava.lepain@gmail.com >
2026-01-23 08:14:55 +01:00
Charles Cabergs
5ed07097fa
Fix -Wtautological-constant-out-of-range-compare in serializer ( #5050 )
...
Signed-off-by: Charles Cabergs <me@cacharle.xyz >
2026-01-13 17:19:38 +01:00
Niels Lohmann
e3014f162a
Fix conversion to std::optional ( #5052 )
...
* 🐛 fix conversion to std::optional
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 >
2026-01-13 17:19:34 +01:00
Ville Vesilehto
457bc283ff
fix(cbor): reject overflowing negative integers ( #5039 )
...
* fix(cbor): reject negative ints overflowing int64
CBOR encodes negative integers as "-1 - n" where n is uint64_t. When
n > INT64_MAX, casting to int64_t caused undefined behavior and silent
data corruption. Large negative values were incorrectly parsed as
positive integers (e.g., -9223372036854775809 became 9223372036854775807).
Add bounds check for to reject values that exceed int64_t
representable range, returning parse_error instead of silently
corrupting data.
Added regression test cases to verify.
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi >
* chore: clarify tests
Add test for "n=0" case (result=-1) to cover the smallest magnitude
boundary. Update comments to explain CBOR 0x3B encoding and why
"result=0" is not possible. Clarify that n is an unsigned integer
in the formula "result = -1 - n" to help understanding the tests.
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi >
* fix(cbor): extend overflow checks for other types
Extend negative integer overflow detection to all CBOR negative
integer cases (0x38, 0x39, 0x3A) for consistency with the existing
0x3B check.
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi >
---------
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi >
2026-01-12 10:17:47 +01:00
KhloodElhossiny
8f75700141
support types convertible to string_view as JSON keys ( #4958 )
...
Signed-off-by: khloodelhossiny <khloood.elhossiny@gmail.com >
Co-authored-by: khloodelhossiny <khloood.elhossiny@gmail.com >
2026-01-11 21:45:22 +01:00
Niels Lohmann
515d994acb
📄 adjust year ( #5044 )
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2026-01-01 20:00:39 +01:00
Niels Lohmann
29913ca760
Add char8_t* overload for _json and _json_pointer ( #4963 )
2025-10-25 07:56:05 +02:00
Niels Lohmann
54be9b04f0
📄 update REUSE ( #4960 )
2025-10-23 06:56:36 +02:00
Niels Lohmann
1cc56b2dcd
Address CWG issue 2521 ( #4957 )
2025-10-23 06:56:16 +02:00
Niels Lohmann
a63795caf1
🚨 avoid deprecation warning ( #4791 )
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-10-22 21:27:35 +02:00
Niels Lohmann
4106af8d92
🚨 suppress cppcoreguidelines-c-copy-assignment-signature,misc-unconventional-assign-operator ( #4896 )
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-08-20 18:39:45 +02:00
Nikhil
efcf9efb4f
Fixes #4854 Explicitly handle nullptr in sax_parse ( #4873 )
...
* handle nullptr explicitly
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* add test
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* make amalgamate
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* Fix formatting
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* move sax parse test to relevant unit test file
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* extend exceptions.md to include other_error.502
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* Better exception messages
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* link sax_parse function
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* fix string
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* amalgamate
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* fix clang-tidy checks
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* cover valid handler with no throw
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* Add tests for other two overloads
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* cover overload with valid sax handler
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* pass an rvalue
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* ignore -Wtautological-pointer-compare
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* ignore clang-analyzer-core.NonNullParamChecker
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* ignore gcc -Wnonnull-compare
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* ignore undefined-behaviour-sanitizer
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* nest directives to ignore sanitizer errors
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* use elif
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
---------
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
2025-08-02 21:06: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
David Kilzer
d70e46bc65
🐛 add missing header to input_adapters.hpp ( #4830 )
...
Signed-off-by: David Kilzer <ddkilzer@apple.com >
Co-authored-by: David Kilzer <ddkilzer@apple.com >
2025-06-25 07:20:17 +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
chirsz
4b17f90f65
Add ignore_trailing_commas option ( #4609 )
...
Added examples and modified the corresponding documents and unit tests.
Signed-off-by: chirsz-ever <chirsz-ever@outlook.com >
Co-authored-by: Niels Lohmann <niels.lohmann@gmail.com >
2025-05-22 08:01:46 +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
NmPassTHFan
46e7cd3dc2
Replace deprecated std::is_trivial in C++26 ( #4775 )
2025-05-16 16:11:44 +02:00
Niels Lohmann
9110918cf8
Fix typos ( #4748 )
...
* ✏️ fix typos
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ✏️ address review comments
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ✏️ address review comments
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-05-04 10:28:24 +02:00
Ville Vesilehto
dff2b4756c
fix: BJData size calculation overflow ( #4765 )
...
Adds pre-multiplication overflow detection to catch cases where dimension
products would exceed size_t max. The previous check only detected when
overflow resulted in exactly 0 or SIZE_MAX, missing other cases.
Retains the original post-multiplication check for backward compatibility.
Adds tests verifying overflow detection with dimensions (2^32+1)×(2^32),
which previously overflowed silently to 2^32.
This prevents custom SAX handlers from receiving incorrect array sizes
that could lead to buffer overflows.
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi >
2025-04-29 10:17:50 +02:00
Niels Lohmann
eef76c200e
Make library work with C++20 modules ( #4764 )
...
* ✅ add test for C++20 modules
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix warning
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 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 >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-28 21:52:26 +02:00
Xiaochuan Ye
3b02afb9d9
Specialize char_traits for std::byte to fix from_msgpack ( fixes #4756 ) ( #4760 )
...
* Specialize char_traits for std::byte to fix from_msgpack (fixes #4756 )
Provide a char_traits<std::byte> specialization under __cpp_lib_byte
to allow parsing MessagePack data from containers of std::byte.
Signed-off-by: xuesongtap <tap91624@gmail.com >
Signed-off-by: yexiaochuan <tap91624@gmail.com >
* Fix comments for cstddef include and MessagePack tests
Signed-off-by: xuesongtap <tap91624@gmail.com >
Signed-off-by: yexiaochuan <tap91624@gmail.com >
* Fix include <cstddef> only when __cpp_lib_byte is defined and sufficient
Signed-off-by: yexiaochuan <tap91624@gmail.com >
* Fix clang-tidy warnings in MessagePack std::byte tests
Signed-off-by: yexiaochuan <tap91624@gmail.com >
* Fix handle return value in MessagePack tests
Signed-off-by: yexiaochuan <tap91624@gmail.com >
---------
Signed-off-by: xuesongtap <tap91624@gmail.com >
Signed-off-by: yexiaochuan <tap91624@gmail.com >
2025-04-28 16:19:47 +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
Sergiu Deitsch
756ca22ec5
Provide fallback for missing char8_t support ( #4736 )
2025-04-23 18:36:41 +02:00
Niels Lohmann
c67d538274
Fix C4702 warning and extend MSVC CI job ( #4749 )
...
* ⚗️ try matrix for latest
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* ♻️ refactor from https://github.com/nlohmann/json/issues/4745#issuecomment-2810128420
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 simplify CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 simplify CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 🚨 fix cpplint warning
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 simplify CI
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-17 18:04:09 +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
4cca3b9cb2
Fix warning and add emscripten CI step ( #4738 )
...
* 🚨 fix warning
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 👷 add emscripten
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
* 📝 add compiler to list
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-13 17:54:56 +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
4424a0fcc1
📝 update documentation ( #4723 )
...
Signed-off-by: Niels Lohmann <mail@nlohmann.me >
2025-04-05 18:54:35 +02:00
risa2000
11aa5f944d
Make std::filesystem::path conversion to/from UTF-8 encoded string explicit ( #4631 )
...
* Make std::filesystem::path conversion to/from UTF-8 encoded JSON string explicit.
Signed-off-by: Richard Musil <risa2000x@gmail.com >
* Experimental: Changing C++ standard detection logic to accommodate potential corner cases.
Signed-off-by: Richard Musil <risa2000x@gmail.com >
* Drop C++ standard tests for compilers which do not implement required features.
Signed-off-by: Richard Musil <risa2000x@gmail.com >
* Drop C++ standard tests for MSVC versions which do not implement required features.
Signed-off-by: Richard Musil <risa2000x@gmail.com >
---------
Signed-off-by: Richard Musil <risa2000x@gmail.com >
Co-authored-by: Richard Musil <risa2000x@gmail.com >
2025-04-04 10:59:23 +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
Harinath Nampally
bf8ccc20e9
fix compilation issue ( #4613 )
...
* fix compilation issue
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* add unit test
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* fix ci failure check
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
---------
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
2025-01-22 21:28:51 +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
Harinath Nampally
d23291ba26
use diagnostic positions in exceptions ( #4585 )
...
* add a ci step for Json_Diagnostic_Positions
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* Update ci.cmake to address review comments
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* address review comment
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* fix typo in the comment
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* fix typos in ci.cmake
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* invoke the new ci step from ubuntu.yml
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* issue4561 - use diagnostic positions for exceptions
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* fix ci_test_documentation check
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* address review comments
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* fix ci check failures for unit-diagnostic-postions.cpp
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* improvements based on review comments
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* fix const correctness string
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* further refinements based on reviews
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* add one more test case for full coverage
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* ci check fix - add const
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* add unit tests for json_diagnostic_postions only
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* fix ci_test_diagnostics
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
* fix ci_test_build_documentation check
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
---------
Signed-off-by: Harinath Nampally <harinath922@gmail.com >
2025-01-19 10:42:21 +01:00
kimci86
8a882f32ed
Generate template functions with NLOHMANN_DEFINE_TYPE macros ( #4597 )
...
* Support any basic_json type in NLOHMANN_DEFINE_TYPE_* macros
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Test NLOHMANN_DEFINE_TYPE_* macros also support unordered_json
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Simplify test about NLOHMANN_DEFINE_TYPE_ with many arguments
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Remove extra scope in macros tests
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Remove unused test class in macros tests
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Update documentation about NLOHMANN_DEFINE_TYPE_* macros
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Fix NLOHMANN_JSON_SERIALIZE_ENUM documentation
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Mark some variables const in macros tests, fixes clang-tidy
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Workaround clang 3.5 issue with const object initialization
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Update highlighted lines in NLOHMANN_DEFINE_TYPE_* macros examples
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Fix swapped macros in documentation
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Remove extra backslashes at the end of macros
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Require basic_json type in NLOHMANN_DEFINE_TYPE_* generated functions
Signed-off-by: kimci86 <kimci86@hotmail.fr >
* Fix typos in macros documentation
Signed-off-by: kimci86 <kimci86@hotmail.fr >
---------
Signed-off-by: kimci86 <kimci86@hotmail.fr >
2025-01-18 22:59:09 +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
Niels Lohmann
26cfec34be
Clean up and document project files ( #4560 )
2025-01-17 06:53:35 +01:00
Michael Valladolid
2d42229f4d
Support BSON uint64 de/serialization ( #4590 )
...
* Support BSON uint64 de/serialization
Signed-off-by: Michael Valladolid <mikevalladolid@gmail.com >
* Treat 0x11 as uint64 and not timestamp specific
Signed-off-by: Michael Valladolid <mikevalladolid@gmail.com >
---------
Signed-off-by: Michael Valladolid <mikevalladolid@gmail.com >
2025-01-10 14:59:55 +01:00
Nebojša Cvetković
48e7b4c23b
BJData Fixes ( #4588 )
2025-01-07 22:10:38 +01:00
Nebojša Cvetković
2e50d5b2f3
BJData optimized binary array type ( #4513 )
2025-01-07 18:09:19 +01:00
Nikhil
60c48755e3
Add missing macros in README and link to docs for more info ( #4582 )
...
* Add nav items for serialize macros
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* match order of non-intrusive macros to intrusive macros
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* Add missing macros and link for more info
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* Add @brief macro tags
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* make amalgamate
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* Add since version tags
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
* Revert "Add missing macros and link for more info"
This reverts commit 4c9b3ae9bf7a25c81dc1c6217a72a30a39086979.
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
---------
Signed-off-by: Nikhil <nikhilreddydev@gmail.com >
2025-01-03 22:19:37 +01:00
Michael Valladolid
4f64d8d0b4
Modernize integer comparison ( #4577 )
...
Replace static_cast<size_t>(-1) with std::numeric_limits<std::size_t>::max()
via the detail::unknown_size() function
2025-01-01 17:01:38 +01:00
Nissim Armand Ben Danan
2134cb947a
Fix NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT with an empty JSON instance ( #4508 )
...
* change NLOHMANN_JSON_FROM_WITH_DEFAULT to let NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT work with an empty JSON instance
* fix ci_static_analysis_clang (ci_clang_tidy)
* change NLOHMANN_JSON_FROM_WITH_DEFAULT to let NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT work with an empty JSON instance
2024-12-31 08:16:43 +01:00
Niels Lohmann
6057b31df7
Overwork astyle call ( #4573 )
...
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* Use ubuntu-latest image to run Valgrind (#4575 )
* 🔧 use Clang image to run valgrind
* 🔧 use Clang image to run valgrind
* 🔧 use Clang image to run valgrind
* 🔧 use Ubuntu image to run valgrind
* Use Clang image to run iwyu (#4574 )
* 🔧 use Clang image to run iwyu
* 🔧 use Clang image to run iwyu
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🔧 overwork astyle call
* 🎨 format code
* 🔨 clean up
2024-12-29 17:06:03 +01:00
Niels Lohmann
0fa326a8e8
Use Clang image to run iwyu ( #4574 )
...
* 🔧 use Clang image to run iwyu
* 🔧 use Clang image to run iwyu
2024-12-29 15:49:35 +01:00
Harinath Nampally
5ff90d9e02
fix diagnostic positions related compilation errors ( #4570 )
2024-12-28 16:22:45 +01:00
Einars Netlis-Galejs
af4ad7915c
Add ONLY_SERIALIZE for NLOHMANN_DEFINE_DERIVED_TYPE_* macros ( #4562 )
2024-12-20 11:31:22 +01:00