Commit Graph
4584 Commits
Author SHA1 Message Date
aff5a31d35 Add NLOHMANN_DEFINE_DERIVED_TYPE_* macros (#4033)
* Add NLOHMANN_DEFINE_DERIVED_TYPE_* macros

* Fix with amalgamate

* Add documentation

* Fix with amalgamate

* Fix with amalgamate

---------

Co-authored-by: Niccolò Iardella <niccolo.iardella@doriansrl.it>
2024-11-08 21:41:19 +01:00
Balazs ErsekiandGitHub ac8b22180d Update CONTRIBUTING.md (#4486)
Typo in the filename.
2024-11-04 17:45:58 +01:00
thetimrandGitHub 6325839776 Update is_structured.md (#4472) 2024-10-08 06:53:32 +02:00
Griffin MyersandGitHub b36f4c477c Update natvis to reflect 3.11.3 and the current structure of basic_json (#4451)
* Update natvis Jinja template to reflect the current structure of basic_json.

In 5a1a57510a the underlying structure of
basic_json was altered to move m_type and m_value under an m_data field.
This updates the nativ template to be consistent with this change.

* Generate nlohmann_json.natvis for 3.11.3 and latest basic_json structure.
2024-09-05 20:28:24 +02:00
Nikhil IdicullaandGitHub 960b763ecd Docs: fix typos of 'whether' in operator_{gt,le,lt}.md (#4412) 2024-07-07 10:22:17 +02:00
Fallen_BreathandGitHub 8c391e04fe Docs: Fix wrong code usage in the Value access section of json_pointer.md (#4255) 2024-04-13 14:15:00 +02:00
Yuanhao JiaandGitHub 01da82eae2 Fix gdb pretty printer (#4343) 2024-04-13 14:11:49 +02:00
laterlaughandGitHub 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
Alex Prabhat BaraandGitHub c883fb0f17 Fix for incorrect function name in documentation example (#4342) 2024-04-10 18:17:47 +02:00
377c767aa1 Updated exception handling to catch const reference in out_of_range (#4331)
Co-authored-by: LeilaSh <leilanagieva81@gmail.com>
2024-04-08 21:12:32 +02:00
Philip MüllerandGitHub 16b3d841d5 Fixed an error in the Custom data source example. (#4335) 2024-04-08 21:11:25 +02:00
AniketDhemareandGitHub 199dea11b1 #4307 Updated docx to 3.10.5 from 3.10.4 (#4310) 2024-03-15 13:12:21 +01:00
ssandGitHub 0457de21cf Align astyle flags in Makefile with CI (#4277)
Remove unsupported `--squeeze-lines=2` parameter

Fixes #4275
2024-01-28 20:25:22 +01:00
Niels LohmannandGitHub c35d260c2f Suppress Clang-Tidy warnings (#4276) 2024-01-28 14:04:07 +01:00
ssandGitHub 6a064e026a Remove broken link from CONTRIBUTING.md (#4274)
http://issuestats.com domain does not exist anymore
2024-01-28 08:55:49 +01:00
alferovandGitHub 7efe875495 Update json_has_static_rtti.md (#4269) 2024-01-18 19:21:53 +01:00
a259ecc51e Fix to_json for enums when the enum has an unsigned underlying type. (#4237)
* Enhance the UDT unit test to expose the issue

Add a new enum type with uint64_t as the underlying type.
Use it in the overall UDT. Not strictly needed, but it helps exercise its expected usage.
Create an object of this enum type with a large value (negative if cast to int64_t).
Perform several checks on this object as converted to `json`, which fail without the fix.

* Fix the issue in the relevant `to_json` overload.

Select the correct json type depending on the signedness of the enum's underlying type.
This fixes the new checks in the unit test.

* Add the fix to the single_include

I ran `make pretty` but that modified 20 files, performing a significant amount of indentation changes, none of them related to my change.
I ran `make amalgamate`, but that did nothing. Apparently, the make rule won't run if the single_include files have already been updated by `make pretty`.
I forced `make amalgamate` to do the work by touching the file with the fix.
I then decided to keep just the minimal needed change: the addition of the fix to the single_include file.

I just am not conversant enough in Linux to know whether I installed astyle correctly (had to clone the source from a beta branch and build, in order to get support for `--squeeze-lines`).

* Resolve CI errors and use qualified `std::uint64_t`

The fix was relying on implicit conversions in the non-taken branch.
- Ordinarily (work on a C++20 codebase) I would have used `if constexpr` here, sidestepping the issue, but that's not available on C++11 so I didn't bother.
- So instead of an `if` statement, I used a compile-time constant to select the correct overload.
- This is arguably better in this case, anyway.

I was using function-style casts for typed constants, which I consider superior for constants, but the CI checks disagree, so changed all to `static_cast`.
- For some reason, the CI checks didn't point at all of them, so I hope I caught them all myself.

Built with clang14 and all unit tests pass.

---------

Co-authored-by: Juan Carlos Arevalo Baeza (JCAB) <jcab@ntdev.microsoft.com>
2023-12-14 09:26:10 +01:00
Niels LohmannandGitHub 3780b41dd0 💰 update sponsors 2023-12-06 20:51:04 +01:00
Niels LohmannandGitHub 9cca280a4d JSON for Modern C++ 3.11.3 (#4222) v3.11.3 2023-11-28 22:36:31 +01:00
Colby HaskellandGitHub 1d597743d8 Fix char_traits deprecation warning (#4179) 2023-11-27 06:51:25 +01:00
Niels LohmannandGitHub f56c6e2e30 Update documentation for the next release (#4216) 2023-11-26 15:51:19 +01:00
Vyacheslav ZhdanovskiyandGitHub 360ce457f4 Add serialization-only user defined type macros (#3816) 2023-11-26 13:18:20 +01:00
Colby HaskellandGitHub 5d931c59a3 Fix failing CI checks (#4215) 2023-11-25 18:04:59 +01:00
Niels Lohmann 6eab7a2b18 💚 fix documentation deploy 2023-11-01 22:16:27 +01:00
Niels Lohmann 1dfe4073e3 💚 fix documentation deploy 2023-11-01 22:09:53 +01:00
Niels Lohmann 4ffd5bd18e 💚 fix documentation deploy 2023-11-01 22:06:01 +01:00
Niels LohmannandGitHub 0261bc04d3 Fix CI (again) (#4196) 2023-11-01 21:23:55 +01:00
Colby HaskellandGitHub 59da644db4 Add more specific error message when attempting to parse empty input (#4180) 2023-10-31 20:17:43 +01:00
Benjamin BuchandGitHub cdb29069da fix cmake header path in install with custom CMAKE_INSTALL_INCLUDEDIR (#4194) 2023-10-31 19:52:54 +01:00
58d6aa5831 Support Apple's Swift Package Manager (#4010)
Co-authored-by: Aleksei <sapial@f-secure.com>
2023-10-21 19:41:10 +02:00
scribamandGitHub edffad036d Fix MinGW CI (#4175) 2023-10-04 22:16:48 +02:00
Mathieu WestphalandGitHub 6adae02ddd Fix spellcheck issue (#4173) 2023-10-04 15:24:38 +02:00
Vyacheslav ZhdanovskiyandGitHub 35c0b3e54c Fix source highlighting in user defined type macros docs (#4169) 2023-10-02 13:09:53 +02:00
Craig ScottandGitHub fac07e22c5 Accept NEW CMake policies up to CMake 3.14 (#4112)
Starting with CMake 3.27, deprecation warnings are issued
when asking for policy settings for CMake 3.4 or earlier.
The cmake_minimum_required() command accepts a version
range, which allows NEW policy settings up to the upper end
of that range to be used, but without raising the minimum
CMake version above the bottom of that range. This means
NEW policy settings will be used where available, without
requiring them. This change updates the project's
cmake_minimum_required() calls to use a version range to
extend the upper policy version to 3.14 where it wasn't already
at that version or higher. This prevents the deprecation warning
from CMake 3.27, and gives breathing space before a future
CMake release will start issuing similar deprecation warnings
again.
2023-09-25 09:31:26 +02:00
alferovandGitHub 6d4b72d3c3 Fix compile error with _HAS_STATIC_RTTI=0 (#4046) 2023-09-24 11:23:41 +02:00
Niels LohmannandGitHub bbd2e1636d Fix deprecation warning (#4161) 2023-09-23 20:16:37 +02:00
tomalakgeretkalandGitHub 6e36c721f0 Fixed init-list construction when size_type is not int (#4140) 2023-09-23 17:21:40 +02:00
miny1233andGitHub e75b94b31e Update index.md (#4159) 2023-09-23 17:20:47 +02:00
Ivor WandersandGitHub aa87ab8b40 Capture exceptions by const& in docs. (#4099) 2023-09-23 17:19:50 +02:00
Niels LohmannandGitHub 1ce29fa22f Fix CI (#4160) 2023-09-23 17:19:28 +02:00
HO-COOHandGitHub 5fec803493 Update index.md (#4149) 2023-09-14 17:46:34 +02:00
Felix YanandGitHub da92c0e3e7 Correct a typo in serve_header/README.md (#4143) 2023-09-10 21:49:38 +02:00
Niels LohmannandGitHub 836b7beca4 Fix CI, again (#4083) 2023-09-07 20:41:12 +02:00
Ikko Eltociear AshimineandGitHub 788e5468e4 Fix typo in afl_driver.cpp (#4109) 2023-09-02 17:16:33 +02:00
taroandGitHub 6cc0eaf88f Update CODEOWNERS (#4126) 2023-08-28 22:04:08 +02:00
Niels Lohmann 5d2754306d 💸 add sponsor 2023-06-14 07:39:09 +02:00
c71ecde505 Use template get instead of get in examples (#4039)
Co-authored-by: tusooa <tusooa@kazv.moe>
2023-06-11 10:06:24 +02:00
TomerkmandGitHub 793878898f Added to tests the file unit-algorithm.cpp (c++ 11) functions from algorithm library (#4044) 2023-06-11 09:59:57 +02:00
gregmarrandGitHub 254395e5f7 Add to CONTRIBUTING.md that make pretty is required for test updates. (#4045) 2023-06-08 18:47:44 +02:00
Niels LohmannandGitHub ab06fc9951 Fix Clang-Tidy warnings (#4047) 2023-06-08 18:46:48 +02:00