4722 Commits

Author SHA1 Message Date
dependabot[bot]
eb142e33c0
⬆️ Bump ossf/scorecard-action from 2.3.3 to 2.4.0 (#4545) 2024-12-15 21:54:00 +00:00
dependabot[bot]
1c8e26dcb4
⬆️ Bump lukka/get-cmake from 3.31.0 to 3.31.2 (#4544) 2024-12-15 21:23:59 +00:00
dependabot[bot]
b6b8378c8c
⬆️ Bump github/codeql-action from 2.27.9 to 3.27.9 (#4543) 2024-12-15 20:55:09 +00:00
dependabot[bot]
58949c0ad5
⬆️ Bump actions/github-script from 6.4.0 to 7.0.1 (#4540) 2024-12-15 20:13:29 +00:00
dependabot[bot]
7cfbe321be
⬆️ Bump pyyaml from 6.0 to 6.0.2 in /tools/serve_header (#4541) 2024-12-15 20:12:27 +00:00
StepSecurity Bot
4003f8da02
[StepSecurity] Apply security best practices (#4539)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2024-12-15 18:31:21 +01:00
Niels Lohmann
6a2ae22a5a
📝 add OpenSSF Scorecard badge 2024-12-15 17:16:26 +01:00
Niels Lohmann
620034ecec
♻️ allow patch and diff to be used with arbitrary string types (#4536) 2024-12-13 07:24:50 +01:00
Niels Lohmann
e6cafa573a
📝 fix CPM.cmake example 2024-12-11 08:31:43 +01:00
Niels Lohmann
e0a17f8475
📝 add more package managers (#4533) 2024-12-10 23:18:39 +01:00
Niels Lohmann
20ae363a71
Replace EOF with char_traits (#4532)
* 📝 update customers

* ♻️ replace EOF with char_traits #2755
2024-12-10 20:51:47 +01:00
peng-wang-cn
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
Niels Lohmann
f385fe28f2
💸 update sponsors 2024-12-10 11:59:01 +01:00
Niels Lohmann
981a4c39f4
📝 trigger documentation build 2024-12-10 09:41:45 +01:00
Niels Lohmann
dd81f878f7
🚀 fix permissions 2024-12-10 09:39:21 +01:00
Niels Lohmann
549c79ba7e
Overwork documentation (#4516) 2024-12-09 23:02:30 +01:00
Niels Lohmann
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
Niels Lohmann
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
Niels Lohmann
1b9a9d1f21
Update licenses (#4521)
* 📄 update licenses

* 📄 update licenses
2024-11-29 17:38:42 +01:00
Tianyi Chen
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
Niels Lohmann
e41905fcb0
💸 thanks @phrrngtn 2024-11-27 18:03:21 +01:00
Dylan Baker
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
Niels Lohmann
3d6c664de2
Allow comparing default initialized iterators (#4512) 2024-11-26 06:35:14 +01:00
Niels Lohmann
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
Niels Lohmann
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
Stuart Gorman
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
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
jh96
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
Niels Lohmann
64f68dc563
Suppress warnings in NLOHMANN_JSON_SERIALIZE_ENUM (#4497) 2024-11-17 14:29:27 +01:00
Niels Lohmann
1c5923e5d6
Add comment for #4494 (#4496) 2024-11-17 07:36:05 +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
Marcel
e509007df2
Remove alwayslink=True Bazel flag (#4396) 2024-11-16 23:13:11 +01:00
Fredrik Sandhei
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
zjyhjqs
fd20975a94
Add CPack support (#4459) 2024-11-16 17:09:05 +01:00
Captain Crutches
fde9a86c5a
Make iterator_proxy_value a forward_iterator (#4371) (#4372)
* Make iteration_proxy_value model forward_iterator

* Amalgamate

* Suppress tidy warning
2024-11-15 09:28:40 +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
Niels Lohmann
4a602df34e
Add lgtm explanation (#4362) 2024-11-10 13:15:23 +01:00
Borislav Stanimirov
18ff442e63
Allow overriding the CMake target name (#4483) 2024-11-08 21:42:36 +01:00
Niccolò Iardella
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 Erseki
ac8b22180d
Update CONTRIBUTING.md (#4486)
Typo in the filename.
2024-11-04 17:45:58 +01:00
thetimr
6325839776
Update is_structured.md (#4472) 2024-10-08 06:53:32 +02:00
Griffin Myers
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 5a1a57510a330a521d1b20170b8e45aad52d790a 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 Idiculla
960b763ecd
Docs: fix typos of 'whether' in operator_{gt,le,lt}.md (#4412) 2024-07-07 10:22:17 +02:00
Fallen_Breath
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 Jia
01da82eae2
Fix gdb pretty printer (#4343) 2024-04-13 14:11:49 +02: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
Alex Prabhat Bara
c883fb0f17
Fix for incorrect function name in documentation example (#4342) 2024-04-10 18:17:47 +02:00
Leila Shcheglova
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üller
16b3d841d5
Fixed an error in the Custom data source example. (#4335) 2024-04-08 21:11:25 +02:00
AniketDhemare
199dea11b1
#4307 Updated docx to 3.10.5 from 3.10.4 (#4310) 2024-03-15 13:12:21 +01:00