Compare commits

..

131 Commits

Author SHA1 Message Date
dependabot[bot]
8167d2f641 ⬆️ Bump github/codeql-action from 4.32.1 to 4.32.3 (#5077)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.1 to 4.32.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6bc82e05fd...9e907b5e64)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 19:36:02 +01:00
dependabot[bot]
e5e06e1a7b ⬆️ Bump srvaroa/labeler (#5080)
Bumps [srvaroa/labeler](https://github.com/srvaroa/labeler) from b4493338d7929ddc4ffc95fadf6f28c73bae2e90 to 471cdb892ebac76de6cb869105a2017fa3b9b9b3.
- [Release notes](https://github.com/srvaroa/labeler/releases)
- [Commits](b4493338d7...471cdb892e)

---
updated-dependencies:
- dependency-name: srvaroa/labeler
  dependency-version: 471cdb892ebac76de6cb869105a2017fa3b9b9b3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-16 19:35:48 +01:00
dependabot[bot]
904592d2a8 ⬆️ Bump step-security/harden-runner from 2.14.1 to 2.14.2 (#5075)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.14.1 to 2.14.2.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](e3f713f2d8...5ef0c079ce)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 20:15:00 +01:00
Niels Lohmann
f8eee1bb79 Annotate unreachable comment-scanner switch paths to satisfy C26819 (#5071) 2026-02-07 09:15:18 +01:00
dependabot[bot]
21b53746c9 ⬆️ Bump github/codeql-action from 4.32.0 to 4.32.1 (#5067) 2026-02-03 07:33:53 +01:00
dependabot[bot]
553c314fb8 ⬆️ Bump github/codeql-action from 4.31.10 to 4.32.0 (#5064)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.10 to 4.32.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](cdefb33c0f...b20883b0cd)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 17:53:44 +01:00
dependabot[bot]
fa02f62316 ⬆️ Bump step-security/harden-runner from 2.14.0 to 2.14.1 (#5062)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.14.0 to 2.14.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](20cf305ff2...e3f713f2d8)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 17:08:28 +01:00
dependabot[bot]
ae4c81858b ⬆️ Bump mkdocs-git-revision-date-localized-plugin (#5061)
Bumps [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases)
- [Commits](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: mkdocs-git-revision-date-localized-plugin
  dependency-version: 1.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 17:07:31 +01:00
dependabot[bot]
5aef01cca1 ⬆️ Bump actions/checkout from 6.0.1 to 6.0.2 (#5058)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8e8c483db8...de0fac2e45)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 17:06:55 +01:00
dependabot[bot]
e313c6f6ba ⬆️ Bump mkdocs-htmlproofer-plugin in /docs/mkdocs (#5057)
Bumps [mkdocs-htmlproofer-plugin](https://github.com/manuzhang/mkdocs-htmlproofer-plugin) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/manuzhang/mkdocs-htmlproofer-plugin/releases)
- [Commits](https://github.com/manuzhang/mkdocs-htmlproofer-plugin/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: mkdocs-htmlproofer-plugin
  dependency-version: 1.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-27 17:06:05 +01:00
Niels Lohmann
17d1dd9964 💸 add sponsor note (#5063)
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2026-01-27 17:05:04 +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
dependabot[bot]
deb4c4f69f ⬆️ Bump wheel from 0.45.1 to 0.46.3 in /docs/mkdocs (#5056)
Bumps [wheel](https://github.com/pypa/wheel) from 0.45.1 to 0.46.3.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.45.1...0.46.3)

---
updated-dependencies:
- dependency-name: wheel
  dependency-version: 0.46.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-22 17:58:14 +01:00
dependabot[bot]
156ce8dcb4 ⬆️ Bump lukka/get-cmake from 4.2.1 to 4.2.2 (#5055)
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](9e07ecdcee...dc05ee1ee5)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-version: 4.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-22 09:12:52 +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
dependabot[bot]
2bb9d59fde ⬆️ Bump github/codeql-action from 4.31.9 to 4.31.10 (#5051)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.9 to 4.31.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5d4e8d1aca...cdefb33c0f)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-12 21:28:21 +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
dependabot[bot]
14374af9e5 ⬆️ Bump egor-tensin/setup-mingw from 2.2.0 to 3 (#5041) 2025-12-30 18:47:46 +01:00
cheese1
d6e6b21f16 Update README.md (#5040) 2025-12-29 23:05:44 +01:00
dependabot[bot]
30b28175e4 ⬆️ Bump actions/upload-artifact from 5.0.0 to 6.0.0 (#5032)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](330a01c490...b7c566a772)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-22 14:12:18 +01:00
Niels Lohmann
7c2b2ede37 Update bug report template with FAQ reminder (#5037) 2025-12-21 09:14:44 +01:00
dependabot[bot]
8c7a7d474f ⬆️ Bump mkdocs-material from 9.7.0 to 9.7.1 in /docs/mkdocs (#5035)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.7.0 to 9.7.1.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.7.0...9.7.1)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-19 07:39:11 +01:00
dependabot[bot]
ae9c8d82ca ⬆️ Bump github/codeql-action from 4.31.8 to 4.31.9 (#5033)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.8 to 4.31.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1b168cd394...5d4e8d1aca)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-19 07:38:44 +01:00
Niels Lohmann
6a4282395f Adjust versions (#5034)
* 📌 adjust versions

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 📌 adjust versions

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 📌 adjust versions

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 📌 adjust versions

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 📌 adjust versions

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

---------

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-12-18 18:06:51 +01:00
dependabot[bot]
9f35919110 ⬆️ Bump github/codeql-action from 4.31.7 to 4.31.8 (#5031)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.7 to 4.31.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](cf1bb45a27...1b168cd394)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-15 10:01:17 +01:00
dependabot[bot]
75d9166a68 ⬆️ Bump step-security/harden-runner from 2.13.3 to 2.14.0 (#5029)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.3 to 2.14.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](df199fb7be...20cf305ff2)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-10 15:57:58 +00:00
dependabot[bot]
ea3950e040 ⬆️ Bump github/codeql-action from 4.31.6 to 4.31.7 (#5027)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.6 to 4.31.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](fe4161a26a...cf1bb45a27)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 16:32:57 +00:00
dependabot[bot]
38819a9b04 ⬆️ Bump lukka/get-cmake from 4.2.0 to 4.2.1 (#5028)
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](bb2faa721a...9e07ecdcee)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-version: 4.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-09 16:32:27 +00:00
dependabot[bot]
02ac0d6525 ⬆️ Bump actions/stale from 10.1.0 to 10.1.1 (#5024)
Bumps [actions/stale](https://github.com/actions/stale) from 10.1.0 to 10.1.1.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](5f858e3efb...997185467f)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 18:11:49 +01:00
dependabot[bot]
c89e8fac63 ⬆️ Bump actions/checkout from 6.0.0 to 6.0.1 (#5025)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1af3b93b68...8e8c483db8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 18:11:27 +01:00
Aditya
b825d3dafb docs: improve clarity and formatting in documentation generation section (#5021) 2025-12-03 00:15:27 +01:00
dependabot[bot]
baceef2286 ⬆️ Bump step-security/harden-runner from 2.13.2 to 2.13.3 (#5020)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.2 to 2.13.3.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](95d9a5deda...df199fb7be)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 16:54:33 +01:00
SamareshSingh
0422165315 Handle 'moved' events in serve_header.py (#4997)
Fixes #3659

I was testing serve_header.py with my local development setup and noticed
that when I moved directories into or out of the monitored root, they
weren't being picked up properly. The script would only detect create and
delete events but not move operations.

This was happening because the on_any_event handler only checked for
'created' and 'deleted' events on directories. Move events have a
separate event type 'moved' that includes both the source and destination
paths.

The fix treats a move event like a combination of delete (for the source)
and create (for the destination) - we rescan to remove any trees that were
moved out, and add the destination directory to check for new trees that
were moved in.

This should make the development workflow smoother when reorganizing
project directories while the server is running.

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
2025-12-01 21:21:25 +01:00
dependabot[bot]
942d0225c5 ⬆️ Bump github/codeql-action from 4.31.4 to 4.31.6 (#5019)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.4 to 4.31.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](e12f017898...fe4161a26a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 21:19:40 +01:00
dependabot[bot]
a0e9fb1e63 ⬆️ Bump actions/checkout from 5.0.1 to 6.0.0 (#5008)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.1 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](93cb6efe18...1af3b93b68)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-21 23:57:41 +01:00
dependabot[bot]
d88916a04e ⬆️ Bump lukka/get-cmake from 4.1.2 to 4.2.0 (#5007)
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 4.1.2 to 4.2.0.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](628dd514be...bb2faa721a)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-20 18:35:53 +01:00
dependabot[bot]
2b40a69a25 ⬆️ Bump github/codeql-action from 4.31.3 to 4.31.4 (#5003)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.3 to 4.31.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](014f16e7ab...e12f017898)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-19 18:57:59 +01:00
dependabot[bot]
8fb6fca692 ⬆️ Bump actions/checkout from 5.0.0 to 5.0.1 (#5001)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](08c6903cd8...93cb6efe18)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-18 18:15:21 +01:00
dependabot[bot]
682b14bb57 ⬆️ Bump coverallsapp/github-action from 2.3.6 to 2.3.7 (#5000)
Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.3.6 to 2.3.7.
- [Release notes](https://github.com/coverallsapp/github-action/releases)
- [Commits](648a8eb78e...5cbfd81b66)

---
updated-dependencies:
- dependency-name: coverallsapp/github-action
  dependency-version: 2.3.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-18 18:15:16 +01:00
dependabot[bot]
d9878dff1c ⬆️ Bump github/codeql-action from 4.31.2 to 4.31.3 (#4995)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.2 to 4.31.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4.31.2...014f16e7ab1402f30e7c3329d33797e7948572db)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.31.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 20:00:54 +01:00
dependabot[bot]
49026f7999 ⬆️ Bump mkdocs-material from 9.6.23 to 9.7.0 in /docs/mkdocs (#4991)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.23 to 9.7.0.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.23...9.7.0)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-12 19:52:47 +01:00
dependabot[bot]
667c143262 ⬆️ Bump actions/dependency-review-action from 4.8.1 to 4.8.2 (#4992)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.8.1 to 4.8.2.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](40c09b7dc9...3c4e3dcb1a)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 4.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-12 19:52:39 +01:00
dependabot[bot]
af524ab666 ⬆️ Bump step-security/harden-runner from 2.13.1 to 2.13.2 (#4990) 2025-11-05 18:07:31 +01:00
dependabot[bot]
11627521ae ⬆️ Bump mkdocs-material from 9.6.22 to 9.6.23 in /docs/mkdocs (#4986)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.22 to 9.6.23.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.22...9.6.23)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-04 11:26:49 +01:00
dependabot[bot]
63bc495cf8 ⬆️ Bump returntocorp/semgrep-action (#4988)
Bumps [returntocorp/semgrep-action](https://github.com/returntocorp/semgrep-action) from fcd5ab7459e8d91cb1777481980d1b18b4fc6735 to 713efdd345f3035192eaa63f56867b88e63e4e5d.
- [Changelog](https://github.com/returntocorp/semgrep-action/blob/develop/CHANGELOG.md)
- [Commits](fcd5ab7459...713efdd345)

---
updated-dependencies:
- dependency-name: returntocorp/semgrep-action
  dependency-version: 713efdd345f3035192eaa63f56867b88e63e4e5d
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-04 11:26:36 +01:00
dependabot[bot]
9c38185167 ⬆️ Bump mkdocs-git-revision-date-localized-plugin (#4987) 2025-11-04 08:03:46 +01:00
Niels Lohmann
c8b66cf36e 🔒 harden runners (#4985) 2025-11-03 06:33:14 +01:00
Gianfranco Costamagna
0c9b68e110 Add a mention of git_required label to skil tests also in case of network issues (#4851) 2025-11-02 08:34:30 +01:00
Niels Lohmann
8deac49f50 Update GitHub Actions versions in semgrep.yml (#4982)
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-10-31 20:36:36 +01:00
Niels Lohmann
8c5344eeb2 Update flawfinder workflow with new versions (#4981)
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-10-31 20:36:30 +01:00
Niels Lohmann
034f3ecdc6 Add Flawfinder workflow for security scanning (#4979)
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-10-31 17:51:08 +01:00
Niels Lohmann
e137f2ac88 Add Semgrep workflow for code scanning (#4980)
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-10-31 17:47:28 +01:00
Niels Lohmann
49d5c45767 📌 pin emscripten dependency (#4977) 2025-10-31 11:45:32 +01:00
dependabot[bot]
bccdfad507 ⬆️ Bump github/codeql-action from 4.31.0 to 4.31.2 (#4976) 2025-10-30 17:58:05 +01:00
Andy Choi
cda9c1e3bd Use get instead of template get in REAMD.md and docs in non-template context (#4846)
Signed-off-by: Andy Choi <ccpong516@gmail.com>
2025-10-30 10:23:04 +01:00
dependabot[bot]
a6a92c19bf ⬆️ Bump reuse from 6.1.2 to 6.2.0 in /cmake/requirements (#4971)
Bumps [reuse](https://github.com/fsfe/reuse-tool) from 6.1.2 to 6.2.0.
- [Release notes](https://github.com/fsfe/reuse-tool/releases)
- [Changelog](https://github.com/fsfe/reuse-tool/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsfe/reuse-tool/compare/v6.1.2...v6.2.0)

---
updated-dependencies:
- dependency-name: reuse
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-28 17:15:37 +01:00
dependabot[bot]
4f8ee1d5e0 ⬆️ Bump github/codeql-action from 4.30.9 to 4.31.0 (#4969) 2025-10-27 20:10:10 +01:00
dependabot[bot]
cddd4b831e ⬆️ Bump mkdocs-htmlproofer-plugin in /docs/mkdocs (#4968) 2025-10-27 20:09:56 +01:00
dependabot[bot]
3d8aa21d5f ⬆️ Bump actions/upload-artifact from 4.6.2 to 5.0.0 (#4966) 2025-10-27 20:09:46 +01:00
Niels Lohmann
29913ca760 Add char8_t* overload for _json and _json_pointer (#4963) 2025-10-25 07:56:05 +02:00
dependabot[bot]
df263544ed ⬆️ Bump actions/checkout from 4.2.2 to 5.0.0 (#4964)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.2...08c6903cd8c0fde910a37f88322edcfb5dd907a8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-25 07:49:10 +02:00
Bander
11cc676142 Improve MSVC C++ modules compatibility for nlohmann_json (#4952)
* Improve MSVC C++ modules compatibility for nlohmann_json

- Keep complete module interface with all exports
- Export all standard types: json, basic_json, adl_serializer, json_pointer, ordered_json, ordered_map
- Export detail namespace symbols for advanced usage
- Ensure compatibility with MSVC C++20/23 modules
- Maintain full functionality without breaking changes

Signed-off-by: yudaichen <250074249@qq.com>

* Add C++20 module Windows CI test and fix file ending

- Add ci_module_cpp20 job to Windows workflow to verify module support with MSVC

- Add missing newline at end of json.cppm file

Signed-off-by: yudaichen <250074249@qq.com>

---------

Signed-off-by: yudaichen <250074249@qq.com>
2025-10-24 11:34:11 +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
dependabot[bot]
22ac227155 ⬆️ Bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#4938)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.2 to 2.4.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](05b42c6244...4eaacf0543)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 21:28:24 +02:00
dependabot[bot]
80069a970f ⬆️ Bump mkdocs-material from 9.6.20 to 9.6.22 in /docs/mkdocs (#4953)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.20 to 9.6.22.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.20...9.6.22)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 21:28:17 +02:00
dependabot[bot]
9f334eccf0 ⬆️ Bump github/codeql-action from 3.30.4 to 4.30.9 (#4955)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.4 to 4.30.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](303c0aef88...16140ae1a1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.30.9
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 21:28:08 +02:00
dependabot[bot]
d5d2f99a6d ⬆️ Bump lukka/get-cmake from 4.1.1 to 4.1.2 (#4940)
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](2ecc21724e...628dd514be)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-version: 4.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 21:27:56 +02:00
dependabot[bot]
8ae9bb34f4 ⬆️ Bump actions/dependency-review-action from 4.7.3 to 4.8.1 (#4950)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.7.3 to 4.8.1.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](595b5aeba7...40c09b7dc9)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 4.8.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 21:27:51 +02:00
dependabot[bot]
8499f4f00f ⬆️ Bump actions/stale from 10.0.0 to 10.1.0 (#4944)
Bumps [actions/stale](https://github.com/actions/stale) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](3a9db7e6a4...5f858e3efb)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 21:27:42 +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
dependabot[bot]
0d69a72167 ⬆️ Bump pyyaml from 6.0.2 to 6.0.3 in /docs/mkdocs (#4930)
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.2...6.0.3)

---
updated-dependencies:
- dependency-name: pyyaml
  dependency-version: 6.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 11:18:18 +02:00
dependabot[bot]
2eb21b0eb0 ⬆️ Bump pyyaml from 6.0.2 to 6.0.3 in /tools/serve_header (#4932)
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.2...6.0.3)

---
updated-dependencies:
- dependency-name: pyyaml
  dependency-version: 6.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-22 11:17:47 +02:00
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
DmitriBogdanov
3ed64e502a docs: Fix broken package manager links in the integration tab. (#4934)
Signed-off-by: DmitriBogdanov <dm.bogdanov2000@gmail.com>
2025-09-28 20:12:48 +02:00
dependabot[bot]
9810c39408 ⬆️ Bump github/codeql-action from 3.30.3 to 3.30.4 (#4929)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.3 to 3.30.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](192325c861...303c0aef88)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-26 14:55:02 +02:00
co63oc
44bee1b138 chore: fix typos (#4921)
Signed-off-by: co63oc <co63oc@users.noreply.github.com>
2025-09-16 08:07:00 +02:00
dependabot[bot]
60b39ce2d7 ⬆️ Bump mkdocs-material from 9.6.18 to 9.6.20 in /docs/mkdocs (#4923)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.18 to 9.6.20.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.18...9.6.20)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 20:19:32 +02:00
dependabot[bot]
5b5729584c ⬆️ Bump github/codeql-action from 3.30.0 to 3.30.3 (#4917)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.30.0 to 3.30.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2d92b76c45...192325c861)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.30.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 20:18:58 +02:00
dependabot[bot]
f8913c7954 ⬆️ Bump reuse from 5.0.2 to 5.1.1 in /cmake/requirements (#4910)
Bumps [reuse](https://github.com/fsfe/reuse-tool) from 5.0.2 to 5.1.1.
- [Release notes](https://github.com/fsfe/reuse-tool/releases)
- [Changelog](https://github.com/fsfe/reuse-tool/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsfe/reuse-tool/compare/v5.0.2...v5.1.1)

---
updated-dependencies:
- dependency-name: reuse
  dependency-version: 5.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 20:18:24 +02:00
dependabot[bot]
44b5a6d535 ⬆️ Bump step-security/harden-runner from 2.13.0 to 2.13.1 (#4915)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](ec9f2d5744...f4a75cfd61)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 20:17:48 +02:00
Niels Lohmann
df8605a4c1 Suppress cppcoreguidelines-pro-bounds-avoid-unchecked-container-access (#4919)
* 🚨 suppress cppcoreguidelines-pro-bounds-avoid-unchecked-container-access

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 🚨 suppress llvm-use-ranges

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

---------

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-09-15 12:40:27 +02:00
dependabot[bot]
867127c2f4 ⬆️ Bump actions/stale from 9.1.0 to 10.0.0 (#4908)
Bumps [actions/stale](https://github.com/actions/stale) from 9.1.0 to 10.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](5bef64f19d...3a9db7e6a4)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-05 17:29:01 +02:00
dependabot[bot]
07babee604 ⬆️ Bump actions/github-script from 7.0.1 to 8.0.0 (#4907)
Bumps [actions/github-script](https://github.com/actions/github-script) from 7.0.1 to 8.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](60a0d83039...ed597411d8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-05 17:28:54 +02:00
dependabot[bot]
87a3e4de99 ⬆️ Bump github/codeql-action from 3.29.11 to 3.30.0 (#4905) 2025-09-02 09:19:21 +02:00
dependabot[bot]
b74e119bc6 ⬆️ Bump lukka/get-cmake from 4.1.0 to 4.1.1 (#4906) 2025-09-02 09:18:00 +02:00
Niels Lohmann
4bc4e37f4f Fix Windows CI (#4897)
* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 fix Windows CI

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

---------

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-08-28 16:21:01 +02:00
dependabot[bot]
ec857100a5 ⬆️ Bump actions/dependency-review-action from 4.7.2 to 4.7.3 (#4904) 2025-08-28 08:19:03 +02:00
dependabot[bot]
22db828de4 ⬆️ Bump mkdocs-material from 9.6.17 to 9.6.18 in /docs/mkdocs (#4902)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.17 to 9.6.18.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.17...9.6.18)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-22 18:19:12 +02:00
dependabot[bot]
000db7a6a2 ⬆️ Bump github/codeql-action from 3.29.10 to 3.29.11 (#4900)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.10 to 3.29.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](96f518a34f...3c3833e0f8)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 22:07:35 +02:00
Erik Hu
1fd00198ec add fail-on-error:false for Coveralls (#4891) 2025-08-21 11:07:21 +02:00
dependabot[bot]
6131e52a5b ⬆️ Bump actions/dependency-review-action from 4.7.1 to 4.7.2 (#4895)
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.7.1 to 4.7.2.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](da24556b54...bc41886e18)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 4.7.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-20 22:46:56 +02:00
dependabot[bot]
c711517c00 ⬆️ Bump github/codeql-action from 3.29.9 to 3.29.10 (#4894)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.9 to 3.29.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](df559355d5...96f518a34f)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-20 22:46:49 +02:00
dependabot[bot]
cb13999032 ⬆️ Bump mkdocs-material from 9.6.16 to 9.6.17 in /docs/mkdocs (#4893)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.16 to 9.6.17.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.16...9.6.17)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-20 22:46:44 +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
dependabot[bot]
52d3f6e034 ⬆️ Bump github/codeql-action from 3.29.8 to 3.29.9 (#4888) 2025-08-13 09:29:28 +02:00
dependabot[bot]
cd783971aa ⬆️ Bump lukka/get-cmake from 4.0.3 to 4.1.0 (#4887)
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 4.0.3 to 4.1.0.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](6b3e96a9bc...f3273e0bce)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 13:05:27 +02:00
dependabot[bot]
d275e706ca ⬆️ Bump actions/checkout from 4.2.2 to 5.0.0 (#4886)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 13:04:52 +02:00
dependabot[bot]
89f0225dc6 ⬆️ Bump github/codeql-action from 3.29.6 to 3.29.8 (#4884) 2025-08-08 20:24:47 +02:00
dependabot[bot]
bdc50d513f ⬆️ Bump github/codeql-action from 3.29.5 to 3.29.6 (#4881)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.5 to 3.29.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](51f77329af...a4e1a019f5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-08 10:26:07 +02:00
Niels Lohmann
32771c5ea3 Suppress more Clang-Tidy warnings (#4879) 2025-08-07 06:50:00 +02:00
Niels Lohmann
e00484f866 📝 update sax_parse documentation (#4878) 2025-08-03 11:21:05 +02:00
Devon Thomas
c5cc4face3 Mention AStyle Formatting in CONTRIBUTING.md (#4867)
* ⬆️ Bump step-security/harden-runner from 2.12.1 to 2.12.2 (#4837)

Signed-off-by: Devon Thomas <thomadev@oregonstate.edu>

* 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>
Signed-off-by: Devon Thomas <thomadev@oregonstate.edu>

* Update CONTRIBUTING.md

Mentioned Artistic Style formatting under make amalgamate section

Signed-off-by: Devon Thomas <thomadev@oregonstate.edu>

* Update CONTRIBUTING.md

removed > syntax

Signed-off-by: Devon Thomas <thomadev@oregonstate.edu>

---------

Signed-off-by: Devon Thomas <thomadev@oregonstate.edu>
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
Signed-off-by: Devon Thomas <166056408+ThomaDevOSU@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niels Lohmann <mail@nlohmann.me>
2025-08-03 10:04:53 +02:00
Miko
a3211ab3ca Simplify module API (#4840)
* Simplify module API

Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com>

* Forgot missing newline

Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com>

---------

Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com>
2025-08-03 10:02:12 +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
hitgirl
55abcb5c0f Fix #4863: skip try_run for LIBCPP_VERSION_OUTPUT during cross compil… (#4876)
* Fix #4863: skip try_run for LIBCPP_VERSION_OUTPUT during cross compilation

Signed-off-by: Hitgirl <hitgirl@Hitgirls-MacBook-Air.local>

* fix #4863: handle cross-compiling in libc++ detection gracefully

Signed-off-by: Hitgirl <hitgirl@Hitgirls-MacBook-Air.local>

* refactor: move cross-compiling check before cached output detection

Signed-off-by: Hitgirl <hitgirl@Hitgirls-MacBook-Air.local>

* refactor: move cross-compiling check before cached output detection

Signed-off-by: Hitgirl <hitgirl@Hitgirls-MacBook-Air.local>

* refactor: move cross-compiling check before cached output detection

Signed-off-by: Hitgirl <hitgirl@Hitgirls-MacBook-Air.local>

---------

Signed-off-by: Hitgirl <hitgirl@Hitgirls-MacBook-Air.local>
Co-authored-by: Hitgirl <hitgirl@Hitgirls-MacBook-Air.local>
2025-08-01 22:53:26 +02:00
dependabot[bot]
c637a8b453 ⬆️ Bump mkdocs-material from 9.6.14 to 9.6.16 in /docs/mkdocs (#4866)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.14 to 9.6.16.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.14...9.6.16)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-version: 9.6.16
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 22:46:44 +02:00
dependabot[bot]
095d2b3a16 ⬆️ Bump step-security/harden-runner from 2.12.2 to 2.13.0 (#4848)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.12.2 to 2.13.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](6c439dc8bd...ec9f2d5744)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 22:45:24 +02:00
dependabot[bot]
9d86144cc0 ⬆️ Bump srvaroa/labeler (#4872)
Bumps [srvaroa/labeler](https://github.com/srvaroa/labeler) from e7bef2249506ba9cbbd3ca5cee256abd9f930b04 to b4493338d7929ddc4ffc95fadf6f28c73bae2e90.
- [Release notes](https://github.com/srvaroa/labeler/releases)
- [Commits](e7bef22495...b4493338d7)

---
updated-dependencies:
- dependency-name: srvaroa/labeler
  dependency-version: b4493338d7929ddc4ffc95fadf6f28c73bae2e90
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 22:32:34 +02:00
dependabot[bot]
f0aa454655 ⬆️ Bump github/codeql-action from 3.29.2 to 3.29.5 (#4874)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](181d5eefc2...51f77329af)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 22:19:22 +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
dependabot[bot]
d33ecd3f3b ⬆️ Bump step-security/harden-runner from 2.12.1 to 2.12.2 (#4837) 2025-06-30 23:28:49 +02:00
dependabot[bot]
d19060e6c7 ⬆️ Bump github/codeql-action from 3.29.1 to 3.29.2 (#4838) 2025-06-30 23:27:46 +02:00
dependabot[bot]
98ac4d85be ⬆️ Bump github/codeql-action from 3.28.18 to 3.29.1 (#4833) 2025-06-29 22:05:38 +02:00
Miko
b7f741165b Add proper C++20 module support (#4799) 2025-06-29 22:02:31 +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
dependabot[bot]
b451735fe7 ⬆️ Bump lukka/get-cmake from 4.0.2 to 4.0.3 (#4820)
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](ea00481682...6b3e96a9bc)

---
updated-dependencies:
- dependency-name: lukka/get-cmake
  dependency-version: 4.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 19:55:34 +02:00
dependabot[bot]
568b708fd4 ⬆️ Bump step-security/harden-runner from 2.12.0 to 2.12.1 (#4815)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](0634a2670c...002fdce3c6)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.12.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-11 18:42:32 +02:00
dependabot[bot]
c633693d3e ⬆️ Bump ossf/scorecard-action from 2.4.1 to 2.4.2 (#4807)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](f49aabe0b5...05b42c6244)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 19:21:43 +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
5f77df4e22 Add Xcode 16.3 (#4803)
* 👷 add Xcode 16.3

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 add arm64 images

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 add arm64 images

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 👷 add Xcode 16.3

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

---------

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-06-01 17:56:06 +02:00
dependabot[bot]
64ebc6d511 ⬆️ Bump mkdocs-git-revision-date-localized-plugin (#4800)
Bumps [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) from 1.4.6 to 1.4.7.
- [Release notes](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases)
- [Commits](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/compare/v1.4.6...v1.4.7)

---
updated-dependencies:
- dependency-name: mkdocs-git-revision-date-localized-plugin
  dependency-version: 1.4.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-01 15:51:53 +02:00
Niels Lohmann
82f4f70669 Adjust warnings flags (#4801)
* 🚨 suppress warnings

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 🚨 suppress warnings

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 🚨 suppress warnings

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 🚨 suppress warnings

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 🚨 suppress warnings

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-05-31 17:48:34 +02:00
Niels Lohmann
68c25aec60 Update customers and add Cloudback (#4797)
* 📝 update customers

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

* 📝 add badge to Cloudback

Signed-off-by: Niels Lohmann <mail@nlohmann.me>

---------

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
2025-05-27 20:55:45 +02:00
dependabot[bot]
ac0133ea89 ⬆️ Bump mkdocs-git-revision-date-localized-plugin (#4795)
Bumps [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) from 1.4.5 to 1.4.6.
- [Release notes](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases)
- [Commits](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/compare/v1.4.5...v1.4.6)

---
updated-dependencies:
- dependency-name: mkdocs-git-revision-date-localized-plugin
  dependency-version: 1.4.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-26 20:43:44 +02:00
Niels Lohmann
281d1e929b Detect used C++ standard library (#4793) 2025-05-23 17:59:52 +02:00
Kuan-Fu, Wu
7421ac31a7 doc: Fix JSON Pointer example to use direct initialization (#4468)
Changed the example code in the documentation from copy initialization
to direct initialization for `json::json_pointer`.
This prevents compilation errors caused by the constructor being explicit.
2025-05-22 12:39:39 +02:00
242 changed files with 1994 additions and 749 deletions

View File

@@ -1,4 +1,5 @@
# TODO: The first three checks are only removed to get the CI going. They have to be addressed at some point.
# TODO: portability-avoid-pragma-once: should be fixed eventually
Checks: '*,
@@ -21,6 +22,7 @@ Checks: '*,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
@@ -33,6 +35,7 @@ Checks: '*,
-fuchsia-overloaded-operator,
-google-explicit-constructor,
-google-readability-function-size,
-google-runtime-float,
-google-runtime-int,
-google-runtime-references,
-hicpp-avoid-goto,
@@ -44,6 +47,8 @@ Checks: '*,
-hicpp-uppercase-literal-suffix,
-llvm-header-guard,
-llvm-include-order,
-llvm-prefer-static-over-anonymous-namespace,
-llvm-use-ranges,
-llvmlibc-*,
-misc-use-anonymous-namespace,
-misc-confusable-identifiers,
@@ -59,13 +64,16 @@ Checks: '*,
-modernize-use-std-numbers,
-modernize-use-trailing-return-type,
-performance-enum-size,
-portability-avoid-pragma-once,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-magic-numbers,
-readability-redundant-access-specifiers,
-readability-redundant-parentheses,
-readability-simplify-boolean-expr,
-readability-uppercase-literal-suffix'
-readability-uppercase-literal-suffix,
-readability-use-concise-preprocessor-directives'
CheckOptions:
- key: hicpp-special-member-functions.AllowSoleDefaultDtor

View File

@@ -153,6 +153,9 @@ files directly; instead, modify the include/nlohmann sources and regenerate the
make amalgamate
```
Running `make amalgamate` will also apply automatic formatting to the source files using
[`Artistic Style`](https://astyle.sourceforge.net/). This formatting may modify your source files in-place. Be certain to review and commit any changes to avoid unintended formatting diffs in commits.
## Recommended documentation
- The librarys [README file](https://github.com/nlohmann/json/blob/master/README.md) is an excellent starting point to

View File

@@ -14,6 +14,8 @@ body:
Note that this form is for bug reports only. Please
[open a discussion](https://github.com/nlohmann/json/discussions/new)
for questions, feature requests, or support requests.
**Please check the [FAQ](https://json.nlohmann.me/home/faq/) before
reporting an issue.** Common questions are answered there.
- type: textarea
id: summary
attributes:

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
@@ -20,7 +20,7 @@ jobs:
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/number
echo ${{ github.event.pull_request.user.login }} > ./pr/author
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pr
path: pr/
@@ -34,18 +34,18 @@ jobs:
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Checkout pull request
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: main
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout tools
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: tools
ref: develop

View File

@@ -6,29 +6,29 @@ permissions:
jobs:
Fuzzing:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e # master
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'json'
dry-run: false
language: c++
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@57fe4475324c5506adbfecdcdd2917f65c86ee9e # master
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'json'
fuzz-seconds: 300
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts

View File

@@ -27,23 +27,23 @@ jobs:
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
with:
languages: c-cpp
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/autobuild@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3

View File

@@ -19,12 +19,12 @@ jobs:
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: 'Download artifact'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
@@ -46,7 +46,7 @@ jobs:
- run: unzip pr.zip
- name: 'Comment on PR'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |

View File

@@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: 'Dependency Review'
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2

46
.github/workflows/flawfinder.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: flawfinder
permissions:
contents: read
on:
push:
branches: [ "develop" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
schedule:
- cron: '41 14 * * 3'
jobs:
flawfinder:
name: Flawfinder
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: flawfinder_scan
uses: david-a-wheeler/flawfinder@c57197cd6061453f10a496f30a732bc1905918d1 # v2.0.19
with:
arguments: '--sarif ./'
output: 'flawfinder_results.sarif'
- name: Upload analysis results to GitHub Security tab
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4
with:
sarif_file: ${{github.workspace}}/flawfinder_results.sarif

View File

@@ -17,10 +17,10 @@ jobs:
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- uses: srvaroa/labeler@e7bef2249506ba9cbbd3ca5cee256abd9f930b04 # master
- uses: srvaroa/labeler@471cdb892ebac76de6cb869105a2017fa3b9b9b3 # master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -27,7 +27,7 @@ jobs:
# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
#
# steps:
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - name: Run CMake
# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
# - name: Build
@@ -45,7 +45,7 @@ jobs:
# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
#
# steps:
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - name: Run CMake
# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
# - name: Build
@@ -53,33 +53,34 @@ jobs:
# - name: Test
# run: cd build ; ctest -j 10 --output-on-failure
macos-13:
runs-on: macos-13 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
strategy:
matrix:
xcode: ['14.1', '14.2', '14.3', '14.3.1', '15.0.1', '15.1', '15.2']
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
- name: Build
run: cmake --build build --parallel 10
- name: Test
run: cd build ; ctest -j 10 --output-on-failure
# macos-13 is deprecated (https://github.com/actions/runner-images/issues/13046)
# macos-13:
# runs-on: macos-13 # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
# strategy:
# matrix:
# xcode: ['14.1', '14.2', '14.3', '14.3.1', '15.0.1', '15.1', '15.2']
# env:
# DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
#
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - name: Run CMake
# run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
# - name: Build
# run: cmake --build build --parallel 10
# - name: Test
# run: cd build ; ctest -j 10 --output-on-failure
macos-14:
runs-on: macos-14 # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
strategy:
matrix:
xcode: ['15.3', '15.4']
xcode: ['15.0.1', '15.1', '15.2', '15.3', '15.4']
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
- name: Build
@@ -91,12 +92,12 @@ jobs:
runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
strategy:
matrix:
xcode: ['16.0', '16.1', '16.2']
xcode: ['16.0', '16.1', '16.2', '16.3', '16.4', '26.0.1']
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
- name: Build
@@ -111,7 +112,7 @@ jobs:
standard: [11, 14, 17, 20, 23, 26]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_TestStandards=${{ matrix.standard }}
- name: Build

View File

@@ -27,11 +27,11 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install virtual environment
run: make install_venv -C docs/mkdocs

View File

@@ -36,17 +36,17 @@ jobs:
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
@@ -68,7 +68,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: SARIF file
path: results.sarif
@@ -76,6 +76,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
with:
sarif_file: results.sarif

54
.github/workflows/semgrep.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow file requires a free account on Semgrep.dev to
# manage rules, file ignores, notifications, and more.
#
# See https://semgrep.dev/docs
name: Semgrep
on:
push:
branches: [ "develop" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
schedule:
- cron: '23 2 * * 4'
permissions:
contents: read
jobs:
semgrep:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Scan
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
# Checkout project source
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Scan code using project's configuration on https://semgrep.dev/manage
- uses: returntocorp/semgrep-action@713efdd345f3035192eaa63f56867b88e63e4e5d
with:
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
publishDeployment: ${{ secrets.SEMGREP_DEPLOYMENT_ID }}
generateSarif: "1"
# Upload SARIF file generated in previous step
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4
with:
sarif_file: semgrep.sarif
if: always()

View File

@@ -16,11 +16,11 @@ jobs:
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
- uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1
with:
stale-issue-label: 'state: stale'
stale-pr-label: 'state: stale'

View File

@@ -21,9 +21,9 @@ jobs:
runs-on: ubuntu-latest
container: gcc:latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v2.4.0
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -46,15 +46,15 @@ jobs:
target: [ci_test_amalgamation, ci_test_single_header, ci_cppcheck, ci_cpplint, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_reuse_compliance, ci_test_valgrind]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Install Valgrind
run: sudo apt-get update ; sudo apt-get install -y valgrind
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -69,9 +69,9 @@ jobs:
steps:
- name: Install git, clang-tools, iwyu (ci_single_binaries), and unzip
run: apt-get update ; apt-get install -y git clang-tools iwyu unzip
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -86,9 +86,9 @@ jobs:
steps:
- name: Install build-essential
run: apt-get update ; apt-get install -y build-essential unzip wget git libssl-dev
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -98,11 +98,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies and de_DE locale
run: |
sudo apt-get clean
@@ -115,15 +115,16 @@ jobs:
- name: Build
run: cmake --build build --target ci_test_coverage
- name: Archive coverage report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: code-coverage-report
path: ${{ github.workspace }}/build/html
- name: Publish report to Coveralls
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept
fail-on-error: false
ci_test_compilers_gcc_old:
runs-on: ubuntu-latest
@@ -132,7 +133,7 @@ jobs:
compiler: ['4.8', '4.9', '5', '6']
container: ghcr.io/nlohmann/json-ci:v2.4.0
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: CXX=g++-${{ matrix.compiler }} cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -146,9 +147,9 @@ jobs:
compiler: ['7', '8', '9', '10', '11', '12', '13', '14', '15', 'latest']
container: gcc:${{ matrix.compiler }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -161,11 +162,9 @@ jobs:
compiler: ['3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15-bullseye', '16', '17', '18', '19', '20', 'latest']
container: silkeh/clang:${{ matrix.compiler }}
steps:
- name: Install unzip and git
run: apt-get update ; apt-get install -y unzip git
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Set env FORCE_STDCPPFS_FLAG for clang 7 / 8 / 9 / 10
run: echo "JSON_FORCED_GLOBAL_COMPILE_OPTIONS=-DJSON_HAS_FILESYSTEM=0;-DJSON_HAS_EXPERIMENTAL_FILESYSTEM=0" >> "$GITHUB_ENV"
if: ${{ matrix.compiler == '7' || matrix.compiler == '8' || matrix.compiler == '9' || matrix.compiler == '10' }}
@@ -181,9 +180,9 @@ jobs:
matrix:
standard: [11, 14, 17, 20, 23, 26]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -199,9 +198,9 @@ jobs:
steps:
- name: Install git and unzip
run: apt-get update ; apt-get install -y git unzip
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build with libc++
@@ -215,7 +214,7 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v2.4.0
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -228,9 +227,9 @@ jobs:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -240,7 +239,7 @@ jobs:
runs-on: ubuntu-latest
container: ghcr.io/nlohmann/json-ci:v2.2.0
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
@@ -252,15 +251,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- name: Install emscripten
uses: mymindstorm/setup-emsdk@v14
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get latest CMake and ninja
uses: lukka/get-cmake@ea004816823209b8d1211e47b216185caee12cc5 # v4.02
uses: lukka/get-cmake@dc05ee1ee5ba69770230c73a6a4e947595745cab # v4.2.2
- name: Run CMake
run: cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -GNinja
- name: Build
@@ -273,11 +272,11 @@ jobs:
target: [ci_test_examples, ci_test_build_documentation]
steps:
- name: Harden Runner
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build

View File

@@ -18,15 +18,15 @@ concurrency:
jobs:
mingw:
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
architecture: [x64, x86]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up MinGW
uses: egor-tensin/setup-mingw@84c781b557efd538dec66bde06988d81cd3138cf # v2.2.0
uses: egor-tensin/setup-mingw@41b837e47d7f85214629d255b9c4bc3fcbe9fd63 # v3.0
with:
platform: ${{ matrix.architecture }}
version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14
@@ -40,24 +40,14 @@ jobs:
msvc:
strategy:
matrix:
runs_on: [windows-2019, windows-2022]
build_type: [Debug, Release]
architecture: [Win32, x64]
std_version: [default, latest]
runs-on: ${{ matrix.runs_on }}
runs-on: windows-2022
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set generator
id: generator
run: |
if [ "${{ matrix.runs_on }}" = "windows-2019" ]; then
echo "generator=Visual Studio 16 2019" >> $GITHUB_ENV
else
echo "generator=Visual Studio 17 2022" >> $GITHUB_ENV
fi
shell: bash
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set extra CXX_FLAGS for latest std_version
id: cxxflags
run: |
@@ -68,11 +58,11 @@ jobs:
fi
shell: bash
- name: Run CMake (Release)
run: cmake -S . -B build -G "$env:generator" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="$env:flags"
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="$env:flags"
if: matrix.build_type == 'Release'
shell: pwsh
- name: Run CMake (Debug)
run: cmake -S . -B build -G "$env:generator" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="$env:flags"
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="$env:flags"
if: matrix.build_type == 'Debug'
shell: pwsh
- name: Build
@@ -81,33 +71,54 @@ jobs:
run: cd build ; ctest -j 10 -C ${{ matrix.build_type }} --output-on-failure
clang:
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
version: [11, 12, 13, 14, 15]
version: [11.0.1, 12.0.1, 13.0.1, 14.0.6, 15.0.7, 16.0.6, 18.1.8, 19.1.7, 20.1.8]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Clang
run: curl -fsSL -o LLVM${{ matrix.version }}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.version }}.0.0/LLVM-${{ matrix.version }}.0.0-win64.exe ; 7z x LLVM${{ matrix.version }}.exe -y -o"C:/Program Files/LLVM"
run: curl -fsSL -o LLVM${{ matrix.version }}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{ matrix.version }}/LLVM-${{ matrix.version }}-win64.exe ; 7z x LLVM${{ matrix.version }}.exe -y -o"C:/Program Files/LLVM"
- name: Set up MinGW
uses: egor-tensin/setup-mingw@41b837e47d7f85214629d255b9c4bc3fcbe9fd63 # v3.0
with:
platform: x64
version: 12.2.0 # https://github.com/egor-tensin/setup-mingw/issues/14
- name: Run CMake
run: cmake -S . -B build -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On
run: cmake -S . -B build ^
-DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" ^
-DCMAKE_CXX_FLAGS="--target=x86_64-w64-mingw32 -stdlib=libstdc++ -pthread" ^
-DCMAKE_EXE_LINKER_FLAGS="-lwinpthread" ^
-G"MinGW Makefiles" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DJSON_BuildTests=On
- name: Build
run: cmake --build build --parallel 10
- name: Test
run: cd build ; ctest -j 10 -C Debug --exclude-regex "test-unicode" --output-on-failure
clang-cl-12:
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
architecture: [Win32, x64]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake
run: cmake -S . -B build -G "Visual Studio 16 2019" -A ${{ matrix.architecture }} -T ClangCL -DJSON_BuildTests=On
run: cmake -S . -B build -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} -T ClangCL -DJSON_BuildTests=On
- name: Build
run: cmake --build build --config Debug --parallel 10
- name: Test
run: cd build ; ctest -j 10 -C Debug --exclude-regex "test-unicode" --output-on-failure
ci_module_cpp20:
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run CMake (Debug)
run: cmake -S . -B build -G "Visual Studio 17 2022" -DJSON_CI=ON -DCMAKE_CXX_FLAGS="/permissive- /std:c++latest /utf-8 /W4 /WX"
- name: Build
run: cmake --build build --config Debug --target ci_module_cpp20

View File

@@ -4,7 +4,7 @@ Upstream-Contact: Niels Lohmann <mail@nlohmann.me>
Source: https://github.com/nlohmann/json
Files: *
Copyright: 2013-2025 Niels Lohmann <https://nlohmann.me>
Copyright: 2013-2026 Niels Lohmann <https://nlohmann.me>
License: MIT
Files: include/nlohmann/thirdparty/hedley.hpp

View File

@@ -22,6 +22,18 @@ endif()
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
include(ExternalProject)
# ---- C++ Modules Support (optional) ----
option(NLOHMANN_JSON_BUILD_MODULES "Build C++ modules support" OFF)
if(NLOHMANN_JSON_BUILD_MODULES)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.28)
message(STATUS "Building nlohmann.json C++ module")
add_subdirectory(src/modules)
else()
message(WARNING "Skipping nlohmann.json C++ module (requires CMake 3.28+, found ${CMAKE_VERSION})")
endif()
endif()
##
## OPTIONS
##

View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2013-2025 Niels Lohmann
Copyright (c) 2013-2026 Niels Lohmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

121
LICENSES/CC0-1.0.txt Normal file
View File

@@ -0,0 +1,121 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.

View File

@@ -258,8 +258,8 @@ serve_header:
##########################################################################
reuse:
pipx run reuse annotate --recursive single_include include -tjson --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2025" --merge-copyrights
pipx run reuse annotate $(TESTS_SRCS) -tjson_support --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2025" --merge-copyrights
pipx run reuse annotate --recursive single_include include -tjson --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2026" --merge-copyrights
pipx run reuse annotate $(TESTS_SRCS) -tjson_support --license MIT --copyright "Niels Lohmann <https://nlohmann.me>" --year "2013-2026" --merge-copyrights
pipx run reuse lint
spdx:

View File

@@ -19,6 +19,7 @@
[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/nlohmann/json.svg)](https://isitmaintained.com/project/nlohmann/json "Average time to resolve an issue")
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/289/badge)](https://bestpractices.coreinfrastructure.org/projects/289)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/nlohmann/json/badge)](https://scorecard.dev/viewer/?uri=github.com/nlohmann/json)
[![Backup Status](https://app.cloudback.it/badge/nlohmann/json)](https://cloudback.it)
[![GitHub Sponsors](https://img.shields.io/badge/GitHub-Sponsors-ff69b4)](https://github.com/sponsors/nlohmann)
[![REUSE status](https://api.reuse.software/badge/github.com/nlohmann/json)](https://api.reuse.software/info/github.com/nlohmann/json)
[![Discord](https://img.shields.io/discord/1003743314341793913)](https://discord.gg/6mrGXKvX7y)
@@ -79,6 +80,7 @@ You can sponsor this library at [GitHub Sponsors](https://github.com/sponsors/nl
- [Martti Laine](https://github.com/codeclown)
- [Paul Harrington](https://github.com/phrrngtn)
- [Mercedes-Benz Group](https://github.com/mercedes-benz)
### :label: Named Sponsors
@@ -157,6 +159,19 @@ std::ifstream f("example.json");
json data = json::parse(f);
```
If using modules (enabled with `NLOHMANN_JSON_BUILD_MODULES`), this example becomes:
```cpp
import std;
import nlohmann.json;
using json = nlohmann::json;
// ...
std::ifstream f("example.json");
json data = json::parse(f);
```
### Creating `json` objects from JSON literals
Assume you want to create hard-code this literal JSON value in a file, as a `json` object:
@@ -331,7 +346,7 @@ Note the difference between serialization and assignment:
json j_string = "this is a string";
// retrieve the string value
auto cpp_string = j_string.template get<std::string>();
auto cpp_string = j_string.get<std::string>();
// retrieve the string value (alternative when a variable already exists)
std::string cpp_string2;
j_string.get_to(cpp_string2);
@@ -340,7 +355,7 @@ j_string.get_to(cpp_string2);
std::string serialized_string = j_string.dump();
// output of original string
std::cout << cpp_string << " == " << cpp_string2 << " == " << j_string.template get<std::string>() << '\n';
std::cout << cpp_string << " == " << cpp_string2 << " == " << j_string.get<std::string>() << '\n';
// output of serialized value
std::cout << j_string << " == " << serialized_string << std::endl;
```
@@ -513,7 +528,7 @@ for (auto& element : j) {
}
// getter/setter
const auto tmp = j[0].template get<std::string>();
const auto tmp = j[0].get<std::string>();
j[1] = 42;
bool foo = j.at(2);
@@ -720,7 +735,7 @@ You can switch off implicit conversions by defining `JSON_USE_IMPLICIT_CONVERSIO
// strings
std::string s1 = "Hello, world!";
json js = s1;
auto s2 = js.template get<std::string>();
auto s2 = js.get<std::string>();
// NOT RECOMMENDED
std::string s3 = js;
std::string s4;
@@ -729,7 +744,7 @@ s4 = js;
// Booleans
bool b1 = true;
json jb = b1;
auto b2 = jb.template get<bool>();
auto b2 = jb.get<bool>();
// NOT RECOMMENDED
bool b3 = jb;
bool b4;
@@ -738,7 +753,7 @@ b4 = jb;
// numbers
int i = 42;
json jn = i;
auto f = jn.template get<double>();
auto f = jn.get<double>();
// NOT RECOMMENDED
double f2 = jb;
double f3;
@@ -781,9 +796,9 @@ j["age"] = p.age;
// convert from JSON: copy each value from the JSON object
ns::person p {
j["name"].template get<std::string>(),
j["address"].template get<std::string>(),
j["age"].template get<int>()
j["name"].get<std::string>(),
j["address"].get<std::string>(),
j["age"].get<int>()
};
```
@@ -800,7 +815,7 @@ std::cout << j << std::endl;
// {"address":"744 Evergreen Terrace","age":60,"name":"Ned Flanders"}
// conversion: json -> person
auto p2 = j.template get<ns::person>();
auto p2 = j.get<ns::person>();
// that's it
assert(p == p2);
@@ -827,13 +842,13 @@ namespace ns {
```
That's all! When calling the `json` constructor with your type, your custom `to_json` method will be automatically called.
Likewise, when calling `template get<your_type>()` or `get_to(your_type&)`, the `from_json` method will be called.
Likewise, when calling `get<your_type>()` or `get_to(your_type&)`, the `from_json` method will be called.
Some important things:
- Those methods **MUST** be in your type's namespace (which can be the global namespace), or the library will not be able to locate them (in this example, they are in namespace `ns`, where `person` is defined).
- Those methods **MUST** be available (e.g., proper headers must be included) everywhere you use these conversions. Look at [issue 1108](https://github.com/nlohmann/json/issues/1108) for errors that may occur otherwise.
- When using `template get<your_type>()`, `your_type` **MUST** be [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). (There is a way to bypass this requirement described later.)
- When using `get<your_type>()`, `your_type` **MUST** be [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). (There is a way to bypass this requirement described later.)
- In function `from_json`, use function [`at()`](https://json.nlohmann.me/api/basic_json/at/) to access the object values rather than `operator[]`. In case a key does not exist, `at` throws an exception that you can handle, whereas `operator[]` exhibits undefined behavior.
- You do not need to add serializers or deserializers for STL types like `std::vector`: the library already implements these.
@@ -913,8 +928,8 @@ namespace nlohmann {
if (j.is_null()) {
opt = boost::none;
} else {
opt = j.template get<T>(); // same as above, but with
// adl_serializer<T>::from_json
opt = j.get<T>(); // same as above, but with
// adl_serializer<T>::from_json
}
}
};
@@ -941,7 +956,7 @@ namespace nlohmann {
// note: the return type is no longer 'void', and the method only takes
// one argument
static move_only_type from_json(const json& j) {
return {j.template get<int>()};
return {j.get<int>()};
}
// Here's the catch! You must provide a to_json method! Otherwise, you
@@ -1005,7 +1020,7 @@ struct bad_serializer
static void to_json(const BasicJsonType& j, T& value) {
// this calls BasicJsonType::json_serializer<T>::from_json(j, value)
// if BasicJsonType::json_serializer == bad_serializer ... oops!
value = j.template get<T>(); // oops!
value = j.get<T>(); // oops!
}
};
```
@@ -1045,11 +1060,11 @@ assert(j == "stopped");
// json string to enum
json j3 = "running";
assert(j3.template get<TaskState>() == TS_RUNNING);
assert(j3.get<TaskState>() == TS_RUNNING);
// undefined json value to enum (where the first map entry above is the default)
json jPi = 3.14;
assert(jPi.template get<TaskState>() == TS_INVALID);
assert(jPi.get<TaskState>() == TS_INVALID);
```
Just as in [Arbitrary Type Conversions](#arbitrary-types-conversions) above,
@@ -1059,7 +1074,7 @@ Just as in [Arbitrary Type Conversions](#arbitrary-types-conversions) above,
Other Important points:
- When using `template get<ENUM_TYPE>()`, undefined JSON values will default to the first pair specified in your map. Select this default pair carefully.
- When using `get<ENUM_TYPE>()`, undefined JSON values will default to the first pair specified in your map. Select this default pair carefully.
- If an enum or JSON value is specified more than once in your map, the first matching occurrence from the top of the map will be returned when converting to or from JSON.
### Binary formats (BSON, CBOR, MessagePack, UBJSON, and BJData)
@@ -1141,7 +1156,7 @@ The library is used in multiple projects, applications, operating systems, etc.
## Supported compilers
Though it's 2025 already, the support for C++11 is still a bit sparse. Currently, the following compilers are known to work:
Though it's 2026 already, the support for C++11 is still a bit sparse. Currently, the following compilers are known to work:
- GCC 4.8 - 14.2 (and possibly later)
- Clang 3.4 - 21.0 (and possibly later)
@@ -1320,7 +1335,7 @@ pkg-config nlohmann_json --cflags
The class is licensed under the [MIT License](https://opensource.org/licenses/MIT):
Copyright &copy; 2013-2025 [Niels Lohmann](https://nlohmann.me)
Copyright &copy; 2013-2026 [Niels Lohmann](https://nlohmann.me)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -1851,7 +1866,7 @@ ctest --output-on-failure
Note that during the `ctest` stage, several JSON test files are downloaded from an [external repository](https://github.com/nlohmann/json_test_data). If policies forbid downloading artifacts during testing, you can download the files yourself and pass the directory with the test files via `-DJSON_TestDataDirectory=path` to CMake. Then, no Internet connectivity is required. See [issue #2189](https://github.com/nlohmann/json/issues/2189) for more information.
If the test suite is not found, several test suites will fail like this:
If the testdata is not found, several test suites will fail like this:
```
===============================================================================
@@ -1869,6 +1884,8 @@ json/tests/src/make_test_data_available.hpp:23: FATAL ERROR: REQUIRE( utils::che
In case you have downloaded the library rather than checked out the code via Git, test `cmake_fetch_content_configure` will fail. Please execute `ctest -LE git_required` to skip these tests. See [issue #2189](https://github.com/nlohmann/json/issues/2189) for more information.
Some tests are requiring network to be properly execute. They are labeled as `git_required`. Please execute `ctest -LE git_required` to skip these tests. See [issue #4851](https://github.com/nlohmann/json/issues/4851) for more information.
Some tests change the installed files and hence make the whole process not reproducible. Please execute `ctest -LE not_reproducible` to skip these tests. See [issue #2324](https://github.com/nlohmann/json/issues/2324) for more information. Furthermore, assertions must be switched off to ensure reproducible builds (see [discussion 4494](https://github.com/nlohmann/json/discussions/4494)).
Note you need to call `cmake -LE "not_reproducible|git_required"` to exclude both labels. See [issue #2596](https://github.com/nlohmann/json/issues/2596) for more information.

View File

@@ -665,7 +665,8 @@ add_custom_target(ci_cuda_example
add_custom_target(ci_module_cpp20
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DJSON_CI=ON -DNLOHMANN_JSON_BUILD_MODULES=ON -DJSON_Install=ON
-S${PROJECT_SOURCE_DIR}/tests/module_cpp20 -B${PROJECT_BINARY_DIR}/ci_module_cpp20
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/ci_module_cpp20
)

View File

@@ -6,6 +6,7 @@
# -Wno-padded We do not care about padding warnings.
# -Wno-covered-switch-default All switches list all cases and a default case.
# -Wno-unsafe-buffer-usage Otherwise Doctest would not compile.
# -Wno-missing-noreturn We found no way to silence this warning otherwise, see PR #4871
set(CLANG_CXXFLAGS
-Werror
@@ -17,4 +18,5 @@ set(CLANG_CXXFLAGS
-Wno-padded
-Wno-covered-switch-default
-Wno-unsafe-buffer-usage
-Wno-missing-noreturn
)

View File

@@ -1,21 +1,33 @@
set(JSON_TEST_DATA_URL https://github.com/nlohmann/json_test_data)
set(JSON_TEST_DATA_VERSION 3.1.0)
include(ExternalProject)
# if variable is set, use test data from given directory rather than downloading them
if(JSON_TestDataDirectory)
message(STATUS "Using test data in ${JSON_TestDataDirectory}.")
add_custom_target(download_test_data)
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${JSON_TestDataDirectory}\"\n")
else()
find_package(Git)
# create a header with the path to the downloaded test data
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/test_files\"\n")
# download test data from GitHub release
ExternalProject_Add(download_test_data_project
URL "${JSON_TEST_DATA_URL}/archive/refs/tags/v${JSON_TEST_DATA_VERSION}.zip"
SOURCE_DIR "${CMAKE_BINARY_DIR}/test_files"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
LOG_DOWNLOAD TRUE
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
EXCLUDE_FROM_ALL TRUE
)
# target to download test data
add_custom_target(download_test_data
COMMAND test -d json_test_data || ${GIT_EXECUTABLE} clone -c advice.detachedHead=false --branch v${JSON_TEST_DATA_VERSION} ${JSON_TEST_DATA_URL}.git --quiet --depth 1
COMMENT "Downloading test data from ${JSON_TEST_DATA_URL} (v${JSON_TEST_DATA_VERSION})"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DEPENDS download_test_data_project
)
# create a header with the path to the downloaded test data
file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/json_test_data\"\n")
endif()
# determine the operating system (for debug and support purposes)
@@ -56,10 +68,14 @@ string(REGEX REPLACE "[ ]*\n" "; " CXX_VERSION_RESULT "${CXX_VERSION_RESULT}")
message(STATUS "Compiler: ${CXX_VERSION_RESULT}")
# determine used C++ standard library (for debug and support purposes)
if(CMAKE_CROSSCOMPILING)
set(LIBCPP_VERSION_OUTPUT_CACHED "could not be detected due to cross-compiling" CACHE STRING "Detected C++ standard library version")
endif()
if(NOT DEFINED LIBCPP_VERSION_OUTPUT_CACHED)
try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
"${CMAKE_BINARY_DIR}" SOURCES "${CMAKE_SOURCE_DIR}/cmake/detect_libcpp_version.cpp"
RUN_OUTPUT_VARIABLE LIBCPP_VERSION_OUTPUT COMPILE_OUTPUT_VARIABLE LIBCPP_VERSION_COMPILE_OUTPUT
RUN_OUTPUT_VARIABLE LIBCPP_VERSION_OUTPUT
COMPILE_OUTPUT_VARIABLE LIBCPP_VERSION_COMPILE_OUTPUT
)
if(NOT LIBCPP_VERSION_OUTPUT)
set(LIBCPP_VERSION_OUTPUT "Unknown")

View File

@@ -1 +1 @@
reuse==5.0.2
reuse==6.2.0

View File

@@ -2,12 +2,12 @@
## Generate documentation
Note on documentation: The source files contain links to the online documentation at https://json.nlohmann.me. This URL
contains the most recent documentation and should also be applicable to previous versions; documentation for deprecated
functions is not removed, but marked deprecated.
Note on documentation: The source files contain links to the online documentation at https://json.nlohmann.me.
This URL provides the most recent documentation and also applies to previous versions. Documentation for deprecated
functions is not removed; instead, it is marked as deprecated.
If you want to see the documentation for a specific tag or commit hash, you can generate it as follows (here for tag
`v3.10.2`):
If you want to view the documentation for a specific tag or commit hash, you can generate it locally as follows (example
using tag `v3.10.2`):
```shell
git clone https://github.com/nlohmann/json.git
@@ -16,5 +16,8 @@ git checkout v3.10.2
make install_venv serve -C docs/mkdocs
```
Open URL <http://127.0.0.1:8000/> in your browser. Replace from any URL from the source code `https://json.nlohmann.me`
with `http://127.0.0.1:8000` to see the documentation for your tag or commit hash.
Open <http://127.0.0.1:8000/> in your browser. Replace any URL in the source code that points to
`https://json.nlohmann.me` with `http://127.0.0.1:8000` to view the documentation for the selected tag or commit hash.

View File

@@ -37,7 +37,7 @@ Copy of the JSON value, converted to `ValueType`
??? example "Example: (1) Default-constructible type"
The example below shows how a `from_json` function can be implemented for a user-defined type. This function is
called by the `adl_serializer` when `template get<ns::person>()` is called.
called by the `adl_serializer` when `get<ns::person>()` is called.
```cpp
--8<-- "examples/from_json__default_constructible.cpp"

View File

@@ -51,10 +51,10 @@ The SAX event lister must follow the interface of [`json_sax`](../json_sax/index
## Parameters
`i` (in)
: Input to parse from.
: Input to parse from
`sax` (in)
: SAX event listener
: SAX event listener (must not be null)
`format` (in)
: the format to parse (JSON, CBOR, MessagePack, or UBJSON) (optional, `input_format_t::json` by default), see
@@ -83,6 +83,17 @@ return value of the last processed SAX event
## Exception safety
Strong guarantee: if an exception is thrown, there are no changes in the JSON value.
## Exceptions
- Throws [`parse_error.101`](../../home/exceptions.md#jsonexceptionparse_error101) in case of an unexpected token, or
empty input like a null `FILE*` or `char*` pointer.
- Throws [`parse_error.102`](../../home/exceptions.md#jsonexceptionparse_error102) if `to_unicode` fails or surrogate
error.
- Throws [`parse_error.103`](../../home/exceptions.md#jsonexceptionparse_error103) if `to_unicode` fails.
- Throws [`other_error.502`](../../home/exceptions.md#jsonexceptionother_error502) if `sax` is a null pointer.
## Complexity
Linear in the length of the input. The parser is a predictive LL(1) parser. The complexity can be higher if the SAX
@@ -114,6 +125,7 @@ A UTF-8 byte order mark is silently ignored.
- Added in version 3.2.0.
- Ignoring comments via `ignore_comments` added in version 3.9.0.
- Added `ignore_trailing_commas` in version 3.12.1.
- Added `json.exception.other_error.502` exception in version 3.12.1.
!!! warning "Deprecation"

View File

@@ -53,7 +53,7 @@ The default value is `0`.
const json j = Choice::first;
// normally invokes from_json parse function but with JSON_DISABLE_ENUM_SERIALIZATION defined, it does not
Choice ch = j.template get<Choice>();
Choice ch = j.get<Choice>();
}
```
@@ -86,7 +86,7 @@ The default value is `0`.
const json j = Choice::first;
// uses user-defined from_json function defined by macro
Choice ch = j.template get<Choice>();
Choice ch = j.get<Choice>();
}
```
@@ -109,7 +109,7 @@ The default value is `0`.
void from_json(const json& j, Choice& ch)
{
auto value = j.template get<std::string>();
auto value = j.get<std::string>();
if (value == "first")
{
ch = Choice::first;
@@ -122,7 +122,7 @@ The default value is `0`.
void to_json(json& j, const Choice& ch)
{
auto value = j.template get<std::string>();
auto value = j.get<std::string>();
if (value == "first")
{
ch = Choice::first;
@@ -139,7 +139,7 @@ The default value is `0`.
const json j = Choice::first;
// uses user-defined from_json function
Choice ch = j.template get<Choice>();
Choice ch = j.get<Choice>();
}
```

View File

@@ -46,7 +46,7 @@ By default, implicit conversions are enabled.
```cpp
json j = "Hello, world!";
auto s = j.template get<std::string>();
auto s = j.get<std::string>();
```
## See also

View File

@@ -37,7 +37,7 @@ inline void from_json(const BasicJsonType& j, type& e);
!!! important "Important notes"
- When using [`template get<ENUM_TYPE>()`](../basic_json/get.md), undefined JSON values will default to the first specified
- When using [`get<ENUM_TYPE>()`](../basic_json/get.md), undefined JSON values will default to the first specified
conversion. Select this default pair carefully. See example 1 below.
- If an enum or JSON value is specified in multiple conversions, the first matching conversion from the top of the
list will be returned when converting to or from JSON. See example 2 below.

View File

@@ -2,6 +2,7 @@
```cpp
json operator ""_json(const char* s, std::size_t n);
json operator ""_json(const char8_t* s, std::size_t n); // since C++20
```
This operator implements a user-defined string literal for JSON objects. It can be used by adding `#!cpp _json` to a
@@ -59,3 +60,4 @@ Linear.
- Added in version 1.0.0.
- Moved to namespace `nlohmann::literals::json_literals` in 3.11.0.
- Added `char8_t*` overload in 3.12.1.

View File

@@ -2,6 +2,7 @@
```cpp
json_pointer operator ""_json_pointer(const char* s, std::size_t n);
json_pointer operator ""_json_pointer(const char8_t* s, std::size_t n); // since C++20
```
This operator implements a user-defined string literal for JSON Pointers. It can be used by adding `#!cpp _json_pointer`
@@ -62,3 +63,4 @@ Linear.
- Added in version 2.0.0.
- Moved to namespace `nlohmann::literals::json_literals` in 3.11.0.
- Added `char8_t*` overload in 3.12.1.

View File

@@ -15,81 +15,83 @@ violations will result in a failed build.
??? abstract "Compilers used in continuous integration"
| Compiler | Architecture | Operating System | CI |
|----------------------------------------------|--------------|--------------------------|-----------|
| AppleClang 14.0.0.14000029; Xcode 14.1 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 14.0.0.14000029; Xcode 14.2 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 14.0.3.14030022; Xcode 14.3.1 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 15.0.0.15000040; Xcode 15.0.1 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 15.0.0.15000100; Xcode 15.1 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 15.0.0.15000100; Xcode 15.2 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 15.0.0.15000309; Xcode 15.3 | arm64 | macOS 14.7.2 (Sonoma) | GitHub |
| AppleClang 15.0.0.15000309; Xcode 15.4 | arm64 | macOS 14.7.2 (Sonoma) | GitHub |
| AppleClang 16.0.0.16000026; Xcode 16 | arm64 | macOS 15.2 (Sequoia) | GitHub |
| AppleClang 16.0.0.16000026; Xcode 16.1 | arm64 | macOS 15.2 (Sequoia) | GitHub |
| AppleClang 16.0.0.16000026; Xcode 16.2 | arm64 | macOS 15.2 (Sequoia) | GitHub |
| Clang 3.5.2 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 3.6.2 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 3.7.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 3.8.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 3.9.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 4.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 5.0.2 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 6.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 7.1.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 8.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 9.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 10.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 11.0.0 with GNU-like command-line | x86_64 | Windows 10 (Build 17763) | GitHub |
| Clang 11.1.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 12.0.0 with GNU-like command-line | x86_64 | Windows 10 (Build 17763) | GitHub |
| Clang 12.0.0 with MSVC-like command-line | x86_64 | Windows 10 (Build 17763) | GitHub |
| Clang 12.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 13.0.0 with GNU-like command-line | x86_64 | Windows 10 (Build 17763) | GitHub |
| Clang 13.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 14.0.0 with GNU-like command-line | x86_64 | Windows 10 (Build 17763) | GitHub |
| Clang 14.0.6 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 15.0.0 with GNU-like command-line | x86_64 | Windows 10 (Build 17763) | GitHub |
| Clang 15.0.7 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 16.0.6 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 17.0.6 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 18.1.8 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 19.1.7 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 20.1.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 21.0.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Emscripten 4.0.6 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 4.8.5 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 4.9.3 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 5.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 6.4.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 7.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 8.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 9.3.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 9.4.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 9.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 10.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 11.4.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 11.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 12.2.0 (MinGW-W64 i686-ucrt-posix-dwarf) | x86_64 | Windows 10 (Build 17763) | GitHub |
| GNU 12.2.0 (MinGW-W64 x86_64-ucrt-posix-seh) | x86_64 | Windows 10 (Build 17763) | GitHub |
| GNU 12.4.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 13.3.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 14.2.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 14.2.0 | arm64 | Linux 6.1.100 | Cirrus CI |
| GNU 15.1.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| icpc (ICC) 2021.5.0 20211109 | x86_64 | Ubuntu 20.04.3 LTS | GitHub |
| MSVC 19.0.24241.7 | x86 | Windows 8.1 | AppVeyor |
| MSVC 19.16.27035.0 | x86 | Windows-10 (Build 14393) | AppVeyor |
| MSVC 19.29.30157.0 | x86 | Windows 10 (Build 17763) | GitHub |
| MSVC 19.29.30157.0 | x86_64 | Windows 10 (Build 17763) | GitHub |
| MSVC 19.29.30157.0 | x86 | Windows-10 (Build 17763) | AppVeyor |
| MSVC 19.42.34435.0 | x86 | Windows 10 (Build 20348) | GitHub |
| MSVC 19.42.34435.0 | x86_64 | Windows 10 (Build 20348) | GitHub |
| Compiler | Architecture | Operating System | CI |
|----------------------------------------------|--------------|-----------------------------------|-----------|
| AppleClang 15.0.0.15000040; Xcode 15.0.1 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 15.0.0.15000100; Xcode 15.1 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 15.0.0.15000100; Xcode 15.2 | x86_64 | macOS 13.7.2 (Ventura) | GitHub |
| AppleClang 15.0.0.15000309; Xcode 15.3 | arm64 | macOS 14.7.2 (Sonoma) | GitHub |
| AppleClang 15.0.0.15000309; Xcode 15.4 | arm64 | macOS 14.7.2 (Sonoma) | GitHub |
| AppleClang 16.0.0.16000026; Xcode 16 | arm64 | macOS 15.2 (Sequoia) | GitHub |
| AppleClang 16.0.0.16000026; Xcode 16.1 | arm64 | macOS 15.2 (Sequoia) | GitHub |
| AppleClang 16.0.0.16000026; Xcode 16.2 | arm64 | macOS 15.2 (Sequoia) | GitHub |
| AppleClang 17.0.0.17000013; Xcode 16.3 | arm64 | macOS 15.5 (Sequoia) | GitHub |
| AppleClang 17.0.0.17000013; Xcode 16.4 | arm64 | macOS 15.5 (Sequoia) | GitHub |
| AppleClang 17.0.0.17000319; Xcode 26.0.1 | arm64 | macOS 15.5 (Sequoia) | GitHub |
| Clang 3.5.2 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 3.6.2 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 3.7.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 3.8.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 3.9.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 4.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 5.0.2 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 6.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 7.1.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 8.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 9.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 10.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 11.0.1 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 11.1.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 12.0.1 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 12.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 13.0.1 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 13.0.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 14.0.6 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 14.0.6 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 15.0.7 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 15.0.7 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 16.0.6 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 16.0.6 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 17.0.6 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 18.1.8 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 18.1.8 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 19.1.5 with MSVC-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 19.1.7 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 19.1.7 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 20.1.1 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Clang 20.1.8 with GNU-like command-line | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| Clang 21.0.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| Emscripten 4.0.6 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 4.8.5 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 4.9.3 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 5.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 6.4.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 7.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 8.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 9.3.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 9.4.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 9.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 10.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 11.4.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 11.5.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 12.2.0 (MinGW-W64 i686-ucrt-posix-dwarf) | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| GNU 12.2.0 (MinGW-W64 x86_64-ucrt-posix-seh) | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
| GNU 12.4.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 13.3.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 14.2.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| GNU 14.2.0 | arm64 | Linux 6.1.100 | Cirrus CI |
| GNU 15.1.0 | x86_64 | Ubuntu 22.04.1 LTS | GitHub |
| icpc (ICC) 2021.5.0 20211109 | x86_64 | Ubuntu 20.04.3 LTS | GitHub |
| MSVC 19.0.24241.7 | x86 | Windows 8.1 | AppVeyor |
| MSVC 19.16.27035.0 | x86 | Windows-10 (Build 14393) | AppVeyor |
| MSVC 19.29.30157.0 | x86 | Windows-10 (Build 17763) | AppVeyor |
| MSVC 19.44.35214.0 | x86 | Windows Server 2022 (Build 20348) | GitHub |
| MSVC 19.44.35214.0 | x86_64 | Windows Server 2022 (Build 20348) | GitHub |
- [x] The library is compiled with all C++ language revisions (C++11, C++14, C++17, C++20, C++23, and C++26) to detect
and fix language deprecations early.
- [x] The library is checked for compiler warnings:
- On Clang, `-Weverything` is used with 7 exceptions.
- On Clang, `-Weverything` is used with 8 exceptions.
??? abstract "Clang warnings"

View File

@@ -5,7 +5,7 @@
using json = nlohmann::json;
/* Demonstration of type error exception with diagnostic postions support enabled */
/* Demonstration of type error exception with diagnostic positions support enabled */
int main()
{
//Invalid json string - housenumber type must be int instead of string

View File

@@ -6,7 +6,7 @@
using json = nlohmann::json;
/* Demonstration of type error exception with diagnostic postions support enabled */
/* Demonstration of type error exception with diagnostic positions support enabled */
int main()
{
//Invalid json string - housenumber type must be int instead of string

View File

@@ -31,7 +31,7 @@ int main()
j["address"] = "744 Evergreen Terrace";
j["age"] = 60;
auto p = j.template get<ns::person>();
auto p = j.get<ns::person>();
std::cout << p.name << " (" << p.age << ") lives in " << p.address << std::endl;
}

View File

@@ -47,7 +47,7 @@ int main()
j["address"] = "744 Evergreen Terrace";
j["age"] = 60;
auto p = j.template get<ns::person>();
auto p = j.get<ns::person>();
std::cout << p.name << " (" << p.age << ") lives in " << p.address << std::endl;
}

View File

@@ -9,11 +9,11 @@ int main()
json value = 17;
// explicitly getting pointers
auto p1 = value.template get<const json::number_integer_t*>();
auto p2 = value.template get<json::number_integer_t*>();
auto p3 = value.template get<json::number_integer_t* const>();
auto p4 = value.template get<const json::number_integer_t* const>();
auto p5 = value.template get<json::number_float_t*>();
auto p1 = value.get<const json::number_integer_t*>();
auto p2 = value.get<json::number_integer_t*>();
auto p3 = value.get<json::number_integer_t* const>();
auto p4 = value.get<const json::number_integer_t* const>();
auto p5 = value.get<json::number_float_t*>();
// print the pointees
std::cout << *p1 << ' ' << *p2 << ' ' << *p3 << ' ' << *p4 << '\n';

View File

@@ -22,14 +22,14 @@ int main()
};
// use explicit conversions
auto v1 = json_types["boolean"].template get<bool>();
auto v2 = json_types["number"]["integer"].template get<int>();
auto v3 = json_types["number"]["integer"].template get<short>();
auto v4 = json_types["number"]["floating-point"].template get<float>();
auto v5 = json_types["number"]["floating-point"].template get<int>();
auto v6 = json_types["string"].template get<std::string>();
auto v7 = json_types["array"].template get<std::vector<short>>();
auto v8 = json_types.template get<std::unordered_map<std::string, json>>();
auto v1 = json_types["boolean"].get<bool>();
auto v2 = json_types["number"]["integer"].get<int>();
auto v3 = json_types["number"]["integer"].get<short>();
auto v4 = json_types["number"]["floating-point"].get<float>();
auto v5 = json_types["number"]["floating-point"].get<int>();
auto v6 = json_types["string"].get<std::string>();
auto v7 = json_types["array"].get<std::vector<short>>();
auto v8 = json_types.get<std::unordered_map<std::string, json>>();
// print the conversion results
std::cout << v1 << '\n';

View File

@@ -4,7 +4,7 @@
"family": "gcc",
"version": "12.4.0"
},
"copyright": "(C) 2013-2025 Niels Lohmann",
"copyright": "(C) 2013-2026 Niels Lohmann",
"name": "JSON for Modern C++",
"platform": "apple",
"url": "https://github.com/nlohmann/json",

View File

@@ -47,13 +47,13 @@ int main()
// deserialization: json -> person
json j2 = R"({"address": "742 Evergreen Terrace", "age": 40, "name": "Homer Simpson"})"_json;
auto p2 = j2.template get<ns::person>();
auto p2 = j2.get<ns::person>();
// incomplete deserialization:
json j3 = R"({"address": "742 Evergreen Terrace", "name": "Maggie Simpson"})"_json;
try
{
auto p3 = j3.template get<ns::person>();
auto p3 = j3.get<ns::person>();
}
catch (const json::exception& e)
{

View File

@@ -33,13 +33,13 @@ int main()
// deserialization: json -> person
json j2 = R"({"address": "742 Evergreen Terrace", "age": 40, "name": "Homer Simpson"})"_json;
auto p2 = j2.template get<ns::person>();
auto p2 = j2.get<ns::person>();
// incomplete deserialization:
json j3 = R"({"address": "742 Evergreen Terrace", "name": "Maggie Simpson"})"_json;
try
{
auto p3 = j3.template get<ns::person>();
auto p3 = j3.get<ns::person>();
}
catch (const json::exception& e)
{

View File

@@ -48,10 +48,10 @@ int main()
// deserialization: json -> person
json j2 = R"({"address": "742 Evergreen Terrace", "age": 40, "name": "Homer Simpson"})"_json;
auto p2 = j2.template get<ns::person>();
auto p2 = j2.get<ns::person>();
// incomplete deserialization:
json j3 = R"({"address": "742 Evergreen Terrace", "name": "Maggie Simpson"})"_json;
auto p3 = j3.template get<ns::person>();
auto p3 = j3.get<ns::person>();
std::cout << "roundtrip: " << json(p3) << std::endl;
}

View File

@@ -33,10 +33,10 @@ int main()
// deserialization: json -> person
json j2 = R"({"address": "742 Evergreen Terrace", "age": 40, "name": "Homer Simpson"})"_json;
auto p2 = j2.template get<ns::person>();
auto p2 = j2.get<ns::person>();
// incomplete deserialization:
json j3 = R"({"address": "742 Evergreen Terrace", "name": "Maggie Simpson"})"_json;
auto p3 = j3.template get<ns::person>();
auto p3 = j3.get<ns::person>();
std::cout << "roundtrip: " << json(p3) << std::endl;
}

View File

@@ -40,13 +40,13 @@ int main()
// deserialization: json -> person
json j2 = R"({"address": "742 Evergreen Terrace", "age": 40, "name": "Homer Simpson"})"_json;
auto p2 = j2.template get<ns::person>();
auto p2 = j2.get<ns::person>();
// incomplete deserialization:
json j3 = R"({"address": "742 Evergreen Terrace", "name": "Maggie Simpson"})"_json;
try
{
auto p3 = j3.template get<ns::person>();
auto p3 = j3.get<ns::person>();
}
catch (const json::exception& e)
{

View File

@@ -26,13 +26,13 @@ int main()
// deserialization: json -> person
json j2 = R"({"address": "742 Evergreen Terrace", "age": 40, "name": "Homer Simpson"})"_json;
auto p2 = j2.template get<ns::person>();
auto p2 = j2.get<ns::person>();
// incomplete deserialization:
json j3 = R"({"address": "742 Evergreen Terrace", "name": "Maggie Simpson"})"_json;
try
{
auto p3 = j3.template get<ns::person>();
auto p3 = j3.get<ns::person>();
}
catch (const json::exception& e)
{

View File

@@ -46,10 +46,10 @@ int main()
// deserialization: json -> person
json j2 = R"({"address": "742 Evergreen Terrace", "age": 40, "name": "Homer Simpson"})"_json;
auto p2 = j2.template get<ns::person>();
auto p2 = j2.get<ns::person>();
// incomplete deserialization:
json j3 = R"({"address": "742 Evergreen Terrace", "name": "Maggie Simpson"})"_json;
auto p3 = j3.template get<ns::person>();
auto p3 = j3.get<ns::person>();
std::cout << "roundtrip: " << json(p3) << std::endl;
}

View File

@@ -31,10 +31,10 @@ int main()
// deserialization: json -> person
json j2 = R"({"address": "742 Evergreen Terrace", "age": 40, "name": "Homer Simpson"})"_json;
auto p2 = j2.template get<ns::person>();
auto p2 = j2.get<ns::person>();
// incomplete deserialization:
json j3 = R"({"address": "742 Evergreen Terrace", "name": "Maggie Simpson"})"_json;
auto p3 = j3.template get<ns::person>();
auto p3 = j3.get<ns::person>();
std::cout << "roundtrip: " << json(p3) << std::endl;
}

View File

@@ -44,16 +44,16 @@ int main()
// deserialization
json j_running = "running";
json j_blue = "blue";
auto running = j_running.template get<ns::TaskState>();
auto blue = j_blue.template get<ns::Color>();
auto running = j_running.get<ns::TaskState>();
auto blue = j_blue.get<ns::Color>();
std::cout << j_running << " -> " << running
<< ", " << j_blue << " -> " << static_cast<int>(blue) << std::endl;
// deserializing undefined JSON value to enum
// (where the first map entry above is the default)
json j_pi = 3.14;
auto invalid = j_pi.template get<ns::TaskState>();
auto unknown = j_pi.template get<ns::Color>();
auto invalid = j_pi.get<ns::TaskState>();
auto unknown = j_pi.get<ns::Color>();
std::cout << j_pi << " -> " << invalid << ", "
<< j_pi << " -> " << static_cast<int>(unknown) << std::endl;
}

View File

@@ -26,8 +26,8 @@ int main()
// deserialization
json j_rot = "rot";
auto rot = j_rot.template get<ns::Color>();
auto red = j_red.template get<ns::Color>();
auto rot = j_rot.get<ns::Color>();
auto red = j_red.get<ns::Color>();
std::cout << j_rot << " -> " << static_cast<int>(rot) << std::endl;
std::cout << j_red << " -> " << static_cast<int>(red) << std::endl;
}

View File

@@ -5,7 +5,7 @@ using json = nlohmann::json;
int main()
{
// create JSON poiner
// create JSON pointer
json::json_pointer ptr("/foo/bar/baz");
// write string representation to stream

View File

@@ -10,5 +10,5 @@ int main()
std::cout << "operator[]: " << j["uint64"] << '\n'
<< "default value (int): " << j.value("uint64", 0) << '\n'
<< "default value (uint64_t): " << j.value("uint64", std::uint64_t(0)) << '\n'
<< "explict return value type: " << j.value<std::uint64_t>("uint64", 0) << '\n';
<< "explicit return value type: " << j.value<std::uint64_t>("uint64", 0) << '\n';
}

View File

@@ -1,4 +1,4 @@
operator[]: 18446744073709551615
default value (int): -1
default value (uint64_t): 18446744073709551615
explict return value type: 18446744073709551615
explicit return value type: 18446744073709551615

View File

@@ -24,9 +24,9 @@ j["age"] = p.age;
// convert from JSON: copy each value from the JSON object
ns::person p {
j["name"].template get<std::string>(),
j["address"].template get<std::string>(),
j["age"].template get<int>()
j["name"].get<std::string>(),
j["address"].get<std::string>(),
j["age"].get<int>()
};
```
@@ -43,7 +43,7 @@ std::cout << j << std::endl;
// {"address":"744 Evergreen Terrace","age":60,"name":"Ned Flanders"}
// conversion: json -> person
auto p2 = j.template get<ns::person>();
auto p2 = j.get<ns::person>();
// that's it
assert(p == p2);
@@ -70,13 +70,13 @@ namespace ns {
```
That's all! When calling the `json` constructor with your type, your custom `to_json` method will be automatically called.
Likewise, when calling `template get<your_type>()` or `get_to(your_type&)`, the `from_json` method will be called.
Likewise, when calling `get<your_type>()` or `get_to(your_type&)`, the `from_json` method will be called.
Some important things:
* Those methods **MUST** be in your type's namespace (which can be the global namespace), or the library will not be able to locate them (in this example, they are in namespace `ns`, where `person` is defined).
* Those methods **MUST** be available (e.g., proper headers must be included) everywhere you use these conversions. Look at [#1108](https://github.com/nlohmann/json/issues/1108) for errors that may occur otherwise.
* When using `template get<your_type>()`, `your_type` **MUST** be [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). (There is a way to bypass this requirement described later.)
* When using `get<your_type>()`, `your_type` **MUST** be [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible). (There is a way to bypass this requirement described later.)
* In function `from_json`, use function [`at()`](../api/basic_json/at.md) to access the object values rather than `operator[]`. In case a key does not exist, `at` throws an exception that you can handle, whereas `operator[]` exhibits undefined behavior.
* You do not need to add serializers or deserializers for STL types like `std::vector`: the library already implements these.
@@ -191,7 +191,7 @@ struct adl_serializer<boost::optional<T>> {
if (j.is_null()) {
opt = boost::none;
} else {
opt = j.template get<T>(); // same as above, but with
opt = j.get<T>(); // same as above, but with
// adl_serializer<T>::from_json
}
}
@@ -224,7 +224,7 @@ namespace nlohmann {
// note: the return type is no longer 'void', and the method only takes
// one argument
static move_only_type from_json(const json& j) {
return {j.template get<int>()};
return {j.get<int>()};
}
// Here's the catch! You must provide a to_json method! Otherwise, you
@@ -288,7 +288,7 @@ struct bad_serializer
static void from_json(const BasicJsonType& j, T& value) {
// this calls BasicJsonType::json_serializer<T>::from_json(j, value);
// if BasicJsonType::json_serializer == bad_serializer ... oops!
value = j.template template get<T>(); // oops!
value = j.template get<T>(); // oops!
}
};
```

View File

@@ -115,7 +115,7 @@ The library uses the following mapping from JSON values types to BJData types ac
}
```
Likewise, when a JSON object in the above form is serialzed using
Likewise, when a JSON object in the above form is serialized using
[`to_bjdata`](../../api/basic_json/to_bjdata.md), it is automatically converted into a compact BJData ND-array. The
only exception is, that when the 1-dimensional vector stored in `"_ArraySize_"` contains a single integer or two
integers with one being 1, a regular 1-D optimized array is generated.

View File

@@ -36,11 +36,11 @@ assert(j == "stopped");
// json string to enum
json j3 = "running";
assert(j3.template get<TaskState>() == TS_RUNNING);
assert(j3.get<TaskState>() == TS_RUNNING);
// undefined json value to enum (where the first map entry above is the default)
json jPi = 3.14;
assert(jPi.template get<TaskState>() == TS_INVALID );
assert(jPi.get<TaskState>() == TS_INVALID );
```
## Notes
@@ -54,7 +54,7 @@ Just as in [Arbitrary Type Conversions](arbitrary_types.md) above,
Other Important points:
- When using `template get<ENUM_TYPE>()`, undefined JSON values will default to the first pair specified in your map. Select this
- When using `get<ENUM_TYPE>()`, undefined JSON values will default to the first pair specified in your map. Select this
default pair carefully.
- If an enum or JSON value is specified more than once in your map, the first matching occurrence from the top of the
map will be returned when converting to or from JSON.

View File

@@ -0,0 +1,34 @@
# Modules
This library has experimental support for C++ modules, introduced in C++20. The library can be imported by writing `import nlohmann.json;` instead of `#include <nlohmann/json.hpp>`.
Please be aware that the module is experimental and a full test is outstanding, and the exported symbols are subject to change.
## Requirements
The `nlohmann.json` module requires that the build system is configured to build and resolve modules when imported. Obviously, as modules were introduced in C++20, this feature can only be used in C++20 and subsequent versions.
To enable building the `nlohmann.json` module (which is not done by default), the macro `NLOHMANN_JSON_BUILD_MODULES` must be passed to the build system.
## Example
When using modules rather than headers, the previous example for creating a `json` object through a JSON file, would instead be:
```cpp
import std;
import nlohmann.json;
using json = nlohmann::json;
// ...
std::ifstream f("example.json");
json data = json::parse(f);
```
## Modules do not export macros
It should be noted that as modules do not export macros, the `nlohmann.json` module will not export any macros, but rather only the following symbols:
- `nlohmann::adl_serializer`
- `nlohmann::basic_json`
- `nlohmann::json`
- `nlohmann::json_pointer`
- `nlohmann::ordered_map`
- `nlohmann::ordered_json`

View File

@@ -10,7 +10,7 @@ types.
The complete default namespace name is derived as follows:
- The root namespace is always `nlohmann`.
- The inline namespace starts with `json_abi` and is followed by serveral optional ABI tags according to the value of
- The inline namespace starts with `json_abi` and is followed by several optional ABI tags according to the value of
these ABI-affecting macros, in order:
- [`JSON_DIAGNOSTICS`](../api/macros/json_diagnostics.md) defined non-zero appends `_diag`.
- [`JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON`](../api/macros/json_use_legacy_discarded_value_comparison.md)

View File

@@ -235,9 +235,9 @@ integers, and between integers and floating-point values to integers. This behav
!!! warning "Unconditional number conversions"
```cpp hl_lines="3"
double d = 42.3; // non-integer double value 42.3
json jd = d; // stores double value 42.3
std::int64_t i = jd.template get<std::int64_t>(); // now i==42; no warning or error is produced
double d = 42.3; // non-integer double value 42.3
json jd = d; // stores double value 42.3
std::int64_t i = jd.get<std::int64_t>(); // now i==42; no warning or error is produced
```
Note the last line with throw a [`json.exception.type_error.302`](../../home/exceptions.md#jsonexceptiontype_error302)
@@ -259,7 +259,7 @@ The rationale is twofold:
if (jd.is_number_integer())
{
// if so, do the conversion and use i
std::int64_t i = jd.template get<std::int64_t>();
std::int64_t i = jd.get<std::int64_t>();
// ...
}
else

View File

@@ -13,7 +13,7 @@ the result of an internet search. If you know further customers of the library,
- [**Alexa Auto SDK**](https://github.com/alexa/alexa-auto-sdk), a software development kit enabling the integration of Alexa into automotive systems
- [**Apollo**](https://github.com/ApolloAuto/apollo), a framework for building autonomous driving systems
- [**Automotive Grade Linux (AGL)**](https://download.automotivelinux.org/AGL/release/jellyfish/latest/qemux86-64/deploy/licenses/nlohmann-json/): a collaborative open-source platform for automotive software development
- [**Automotive Grade Linux (AGL)**](https://download.automotivelinux.org/AGL/release/jellyfish/latest/qemux86-64/deploy/licenses/nlohmann-json/), a collaborative open-source platform for automotive software development
- [**Genesis Motor** (infotainment)](http://webmanual.genesis.com/ccIC/AVNT/JW/KOR/English/reference010.html), a luxury automotive brand
- [**Hyundai** (infotainment)](https://www.hyundai.com/wsvc/ww/download.file.do?id=/content/hyundai/ww/data/opensource/data/GN7-2022/licenseCode/info), a global automotive brand
- [**Kia** (infotainment)](http://webmanual.kia.com/PREM_GEN6/AVNT/RJPE/KOR/Korean/reference010.html), a global automotive brand
@@ -23,30 +23,36 @@ the result of an internet search. If you know further customers of the library,
## Gaming and Entertainment
- [**Assassin's Creed: Mirage**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/): a stealth-action game set in the Middle East, focusing on the journey of a young assassin with classic parkour and stealth mechanics
- [**Chasm: The Rift**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/): a first-person shooter blending horror and adventure, where players navigate dark realms and battle monsters
- [**College Football 25**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/): a college football simulation game featuring gameplay that mimics real-life college teams and competitions
- [**Concepts**](https://concepts.app/en/licenses): a digital sketching app designed for creative professionals, offering flexible drawing tools for illustration, design, and brainstorming
- [**Depthkit**](https://www.depthkit.tv/third-party-licenses): a tool for creating and capturing volumetric video, enabling immersive 3D experiences and interactive content
- [**immersivetech**](https://immersitech.io/open-source-third-party-software/): a technology company focused on immersive experiences, providing tools and solutions for virtual and augmented reality applications
- [**Assassin's Creed: Mirage**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/), a stealth-action game set in the Middle East, focusing on the journey of a young assassin with classic parkour and stealth mechanics
- [**Chasm: The Rift**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/), a first-person shooter blending horror and adventure, where players navigate dark realms and battle monsters
- [**College Football 25**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/), a college football simulation game featuring gameplay that mimics real-life college teams and competitions
- [**Concepts**](https://concepts.app/en/licenses), a digital sketching app designed for creative professionals, offering flexible drawing tools for illustration, design, and brainstorming
- [**Depthkit**](https://www.depthkit.tv/third-party-licenses), a tool for creating and capturing volumetric video, enabling immersive 3D experiences and interactive content
- [**IMG.LY**](https://img.ly/acknowledgements), a platform offering creative tools and SDKs for integrating advanced image and video editing in applications
- [**LOOT**](https://loot.readthedocs.io/_/downloads/en/0.13.0/pdf/), a tool for optimizing the load order of game plugins, commonly used in The Elder Scrolls and Fallout series
- [**Madden NFL 25**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/): a sports simulation game capturing the excitement of American football with realistic gameplay and team management features
- [**Madden NFL 25**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/), a sports simulation game capturing the excitement of American football with realistic gameplay and team management features
- [**Marne**](https://marne.io/licenses), an unofficial private server platform for hosting custom Battlefield 1 game experiences
- [**Minecraft**](https://www.minecraft.net/zh-hant/attribution), a popular sandbox video game
- [**NHL 22**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/): a hockey simulation game offering realistic gameplay, team management, and various modes to enhance the hockey experience
- [**Pixelpart**](https://pixelpart.net/documentation/book/third-party.html): a 2D animation and video compositing software that allows users to create animated graphics and visual effects with a focus on simplicity and ease of use
- [**Red Dead Redemption II**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/): an open-world action-adventure game following an outlaw's story in the late 1800s, emphasizing deep storytelling and immersive gameplay
- [**NHL 22**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/), a hockey simulation game offering realistic gameplay, team management, and various modes to enhance the hockey experience
- [**Pixelpart**](https://pixelpart.net/documentation/book/third-party.html), a 2D animation and video compositing software that allows users to create animated graphics and visual effects with a focus on simplicity and ease of use
- [**Razer Cortex**](https://mysupport.razer.com/app/answers/detail/a_id/14146/~/open-source-software-for-razer-software), a gaming performance optimizer and system booster designed to enhance the gaming experience
- [**Red Dead Redemption II**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/), an open-world action-adventure game following an outlaw's story in the late 1800s, emphasizing deep storytelling and immersive gameplay
- [**Snapchat**](https://www.snap.com/terms/license-android), a multimedia messaging and augmented reality app for communication and entertainment
- [**Tactics Ogre: Reborn**](https://www.square-enix-games.com/en_US/documents/tactics-ogre-reborn-pc-installer-software-and-associated-plug-ins-disclosure), a tactical role-playing game featuring strategic battles and deep storytelling elements
- [**Throne and Liberty**](https://www.amazon.com/gp/help/customer/display.html?nodeId=T7fLNw5oAevCMtJFPj&pop-up=1), an MMORPG that offers an expansive fantasy world with dynamic gameplay and immersive storytelling
- [**Unity Vivox**](https://docs.unity3d.com/Packages/com.unity.services.vivox@15.1/license/Third%20Party%20Notices.html), a communication service that enables voice and text chat functionality in multiplayer games developed with Unity
- [**Zool: Redimensioned**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/): a modern reimagining of the classic platformer featuring fast-paced gameplay and vibrant environments
- [**Zool: Redimensioned**](https://www.mobygames.com/person/1195889/niels-lohmann/credits/), a modern reimagining of the classic platformer featuring fast-paced gameplay and vibrant environments
- [**immersivetech**](https://immersitech.io/open-source-third-party-software/), a technology company focused on immersive experiences, providing tools and solutions for virtual and augmented reality applications
## Consumer Electronics
- [**Audinate**](https://www.audinate.com/legal/software-licensing/dante-av-h-open-source-licenses/): a provider of networked audio solutions specializing in Dante technology, which facilitates high-quality digital audio transport over IP networks
- [**Audinate**](https://www.audinate.com/legal/software-licensing/dante-av-h-open-source-licenses/), a provider of networked audio solutions specializing in Dante technology, which facilitates high-quality digital audio transport over IP networks
- [**Canon CanoScan LIDE**](https://carolburo.com/wp-content/uploads/2024/06/LiDE400_OnlineManual_Win_FR_V02.pdf), a series of flatbed scanners offering high-resolution image scanning for home and office use
- [**Canon PIXMA Printers**](https://www.mediaexpert.pl/products/files/73/7338196/Instrukcja-obslugi-CANON-Pixma-TS7450i.pdf), a line of all-in-one inkjet printers known for high-quality printing and wireless connectivity
- [**Cisco Webex Desk Camera**](https://www.cisco.com/c/dam/en_us/about/doing_business/open_source/docs/CiscoWebexDeskCamera-23-1622100417.pdf), a video camera designed for professional-quality video conferencing and remote collaboration
- [**Philips Hue Personal Wireless Lighting**](http://2ak5ape.257.cz/): a smart lighting system for customizable and wireless home illumination
- [**Philips Hue Personal Wireless Lighting**](http://2ak5ape.257.cz/), a smart lighting system for customizable and wireless home illumination
- [**Ray-Ban Meta Smart glasses**](https://www.meta.com/de/en/legal/smart-glasses/third-party-notices-android/03/), a pair of smart glasses designed for capturing photos and videos with integrated connectivity and social features
- [**Razer Synapse**](https://mysupport.razer.com/app/answers/detail/a_id/14146/~/open-source-software-for-razer-software), a unified configuration software enabling hardware customization for Razer devices
- [**Siemens SINEMA Remote Connect**](https://cache.industry.siemens.com/dl/files/790/109793790/att_1054961/v2/OSS_SINEMA-RC_86.pdf), a remote connectivity solution for monitoring and managing industrial networks and devices securely
- [**Sony PlayStation 4**](https://doc.dl.playstation.net/doc/ps4-oss/index.html), a gaming console developed by Sony that offers a wide range of games and multimedia entertainment features
- [**Sony Virtual Webcam Driver for Remote Camera**](https://helpguide.sony.net/rc/vwd/v1/zh-cn/print.pdf), a software driver that enables the use of Sony cameras as virtual webcams for video conferencing and streaming
@@ -56,7 +62,7 @@ the result of an internet search. If you know further customers of the library,
- [**Apple iOS and macOS**](https://www.apple.com/macos), a family of operating systems developed by Apple, including iOS for mobile devices and macOS for desktop computers
- [**Google Fuchsia**](https://fuchsia.googlesource.com/third_party/json/), an open-source operating system developed by Google, designed to be secure, updatable, and adaptable across various devices
- [**SerenityOS**](https://github.com/SerenityOS/serenity), an open-source operating system that aims to provide a simple and beautiful user experience with a focus on simplicity and elegance
- [**Yocto**](http://ftp.emacinc.com/openembedded-sw/kirkstone-icop-5.15-kirkstone-6.0/archive-2024-10/pn8m-090t-ppc/licenses/nlohmann-json/): a Linux-based build system for creating custom operating systems and software distributions, tailored for embedded devices and IoT applications
- [**Yocto**](http://ftp.emacinc.com/openembedded-sw/kirkstone-icop-5.15-kirkstone-6.0/archive-2024-10/pn8m-090t-ppc/licenses/nlohmann-json/), a Linux-based build system for creating custom operating systems and software distributions, tailored for embedded devices and IoT applications
## Development Tools and IDEs
@@ -66,67 +72,72 @@ the result of an internet search. If you know further customers of the library,
- [**CoderPad**](https://coderpad.io), a collaborative coding platform that enables real-time code interviews and assessments for developers; the library is included in every CoderPad instance and can be accessed with a simple `#include "json.hpp"`
- [**Compiler Explorer**](https://godbolt.org), a web-based tool that allows users to write, compile, and visualize the assembly output of code in various programming languages; the library is readily available and accessible with the directive `#include <nlohmann/json.hpp>`.
- [**GitHub CodeQL**](https://github.com/github/codeql), a code analysis tool used for identifying security vulnerabilities and bugs in software through semantic queries
- [**Hex-Rays**](https://docs.hex-rays.com/user-guide/user-interface/licenses): a reverse engineering toolset for analyzing and decompiling binaries, primarily used for security research and vulnerability analysis
- [**Hex-Rays**](https://docs.hex-rays.com/user-guide/user-interface/licenses), a reverse engineering toolset for analyzing and decompiling binaries, primarily used for security research and vulnerability analysis
- [**ImHex**](https://github.com/WerWolv/ImHex), a hex editor designed for reverse engineering, providing advanced features for data analysis and manipulation
- [**Intel GPA Framework**](https://intel.github.io/gpasdk-doc/src/licenses.html), a suite of cross-platform tools for capturing, analyzing, and optimizing graphics applications across different APIs
- [**Meta Yoga**](https://github.com/facebook/yoga), a layout engine that facilitates flexible and efficient user interface design across multiple platforms
- [**Intopix**](https://www.intopix.com/software-licensing), a provider of advanced image processing and compression solutions used in software development and AV workflows
- [**MKVToolNix**](https://mkvtoolnix.download/doc/README.md), a set of tools for creating, editing, and inspecting MKV (Matroska) multimedia container files
- [**Meta Yoga**](https://github.com/facebook/yoga), a layout engine that facilitates flexible and efficient user interface design across multiple platforms
- [**NVIDIA Nsight Compute**](https://docs.nvidia.com/nsight-compute/2022.2/pdf/CopyrightAndLicenses.pdf), a performance analysis tool for CUDA applications that provides detailed insights into GPU performance metrics
- [**Notepad++**](https://github.com/notepad-plus-plus/notepad-plus-plus), a free source code editor that supports various programming languages
- [**OpenRGB**](https://gitlab.com/CalcProgrammer1/OpenRGB), an open source RGB lighting control that doesn't depend on manufacturer software
- [**OpenTelemetry C++**](https://github.com/open-telemetry/opentelemetry-cpp): a library for collecting and exporting observability data in C++, enabling developers to implement distributed tracing and metrics in their application
- [**OpenTelemetry C++**](https://github.com/open-telemetry/opentelemetry-cpp), a library for collecting and exporting observability data in C++, enabling developers to implement distributed tracing and metrics in their application
- [**Qt Creator**](https://doc.qt.io/qtcreator/qtcreator-attribution-json-nlohmann.html), an IDE for developing applications using the Qt application framework
- [**Scanbot SDK**](https://docs.scanbot.io/barcode-scanner-sdk/web/third-party-libraries/): a software development kit (SDK) that provides tools for integrating advanced document scanning and barcode scanning capabilities into applications
- [**Scanbot SDK**](https://docs.scanbot.io/barcode-scanner-sdk/web/third-party-libraries/), a software development kit (SDK) that provides tools for integrating advanced document scanning and barcode scanning capabilities into applications
## Machine Learning and AI
- [**Apple Core ML Tools**](https://github.com/apple/coremltools), a set of tools for converting and configuring machine learning models for deployment in Apple's Core ML framework
- [**Avular Mobile Robotics**](https://www.avular.com/licenses/nlohmann-json-3.9.1.txt): a platform for developing and deploying mobile robotics solutions
- [**Avular Mobile Robotics**](https://www.avular.com/licenses/nlohmann-json-3.9.1.txt), a platform for developing and deploying mobile robotics solutions
- [**Google gemma.cpp**](https://github.com/google/gemma.cpp), a lightweight C++ inference engine designed for running AI models from the Gemma family
- [**llama.cpp**](https://github.com/ggerganov/llama.cpp), a C++ library designed for efficient inference of large language models (LLMs), enabling streamlined integration into applications
- [**MLX**](https://github.com/ml-explore/mlx), an array framework for machine learning on Apple Silicon
- [**Mozilla llamafile**](https://github.com/Mozilla-Ocho/llamafile), a tool designed for distributing and executing large language models (LLMs) efficiently using a single file format
- [**NVIDIA ACE**](https://docs.nvidia.com/ace/latest/index.html), a suite of real-time AI solutions designed for the development of interactive avatars and digital human applications, enabling scalable and sophisticated user interactions
- [**Peer**](https://support.peer.inc/hc/en-us/articles/17261335054235-Licenses): a platform offering personalized AI assistants for interactive learning and creative collaboration
- [**stable-diffusion.cpp**](https://github.com/leejet/stable-diffusion.cpp): a C++ implementation of the Stable Diffusion image generation model
- [**TanvasTouch**](https://tanvas.co/tanvastouch-sdk-third-party-acknowledgments): a software development kit (SDK) that enables developers to create tactile experiences on touchscreens, allowing users to feel textures and physical sensations in a digital environment
- [**Peer**](https://support.peer.inc/hc/en-us/articles/17261335054235-Licenses), a platform offering personalized AI assistants for interactive learning and creative collaboration
- [**stable-diffusion.cpp**](https://github.com/leejet/stable-diffusion.cpp), a C++ implementation of the Stable Diffusion image generation model
- [**TanvasTouch**](https://tanvas.co/tanvastouch-sdk-third-party-acknowledgments), a software development kit (SDK) that enables developers to create tactile experiences on touchscreens, allowing users to feel textures and physical sensations in a digital environment
- [**TensorFlow**](https://github.com/tensorflow/tensorflow), a machine learning framework that facilitates the development and training of models, supporting data serialization and efficient data exchange between components
## Scientific Research and Analysis
- [**BLACK**](https://www.black-sat.org/en/stable/installation/linux.html), a bounded linear temporal logic (LTL) satisfiability checker
- [**CERN Atlas Athena**](https://gitlab.cern.ch/atlas/athena/-/blob/main/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonMTSvc.h), a software framework used in the ATLAS experiment at the Large Hadron Collider (LHC) for performance monitoring
- [**KAMERA**](https://github.com/Kitware/kamera): a platform for synchronized data collection and real-time deep learning to map marine species like polar bears and seals, aiding Arctic ecosystem research
- [**KiCad**](https://gitlab.com/kicad/code/kicad/-/tree/master/thirdparty/nlohmann_json): a free and open-source software suite for electronic design automation
- [**MeVisLab**](https://mevislabdownloads.mevis.de/docs/current/MeVis/ThirdParty/Documentation/Publish/ThirdPartyReference/index.html): a software framework for medical image processing and visualization.
- [**OpenPMD API**](https://openpmd-api.readthedocs.io/en/0.8.0-alpha/backends/json.html): a versatile programming interface for accessing and managing scientific data, designed to facilitate the efficient storage, retrieval, and sharing of simulation data across various applications and platforms
- [**ParaView**](https://github.com/Kitware/ParaView): an open-source tool for large-scale data visualization and analysis across various scientific domains
- [**QGIS**](https://gitlab.b-data.ch/qgis/qgis/-/blob/backport-57658-to-release-3_34/external/nlohmann/json.hpp): a free and open-source geographic information system (GIS) application that allows users to create, edit, visualize, and analyze geospatial data across a variety of formats
- [**VTK**](https://github.com/Kitware/VTK): a software library for 3D computer graphics, image processing, and visualization
- [**VolView**](https://github.com/Kitware/VolView): a lightweight application for interactive visualization and analysis of 3D medical imaging data.
- [**ICU**](https://github.com/unicode-org/icu), the International Components for Unicode, a mature library for software globalization and multilingual support
- [**KAMERA**](https://github.com/Kitware/kamera), a platform for synchronized data collection and real-time deep learning to map marine species like polar bears and seals, aiding Arctic ecosystem research
- [**KiCad**](https://gitlab.com/kicad/code/kicad/-/tree/master/thirdparty/nlohmann_json), a free and open-source software suite for electronic design automation
- [**Maple**](https://www.maplesoft.com/support/help/Maple/view.aspx?path=copyright), a symbolic and numeric computing environment for advanced mathematical modeling and analysis
- [**MeVisLab**](https://mevislabdownloads.mevis.de/docs/current/MeVis/ThirdParty/Documentation/Publish/ThirdPartyReference/index.html), a software framework for medical image processing and visualization.
- [**OpenPMD API**](https://openpmd-api.readthedocs.io/en/0.8.0-alpha/backends/json.html), a versatile programming interface for accessing and managing scientific data, designed to facilitate the efficient storage, retrieval, and sharing of simulation data across various applications and platforms
- [**ParaView**](https://github.com/Kitware/ParaView), an open-source tool for large-scale data visualization and analysis across various scientific domains
- [**QGIS**](https://gitlab.b-data.ch/qgis/qgis/-/blob/backport-57658-to-release-3_34/external/nlohmann/json.hpp), a free and open-source geographic information system (GIS) application that allows users to create, edit, visualize, and analyze geospatial data across a variety of formats
- [**VTK**](https://github.com/Kitware/VTK), a software library for 3D computer graphics, image processing, and visualization
- [**VolView**](https://github.com/Kitware/VolView), a lightweight application for interactive visualization and analysis of 3D medical imaging data.
## Business and Productivity Software
- [**ArcGIS PRO**](https://www.esri.com/content/dam/esrisites/en-us/media/legal/open-source-acknowledgements/arcgis-pro-2-8-attribution-report.html), a desktop geographic information system (GIS) application developed by Esri for mapping and spatial analysis
- [**Autodesk Desktop**](https://damassets.autodesk.net/content/dam/autodesk/www/Company/legal-notices-trademarks/autodesk-desktop-platform-components/internal-autodesk-components-web-page-2023.pdf), a software platform developed by Autodesk for creating and managing desktop applications and services
- [**Check Point**](https://www.checkpoint.com/about-us/copyright-and-trademarks/): a cybersecurity company specializing in threat prevention and network security solutions, offering a range of products designed to protect enterprises from cyber threats and ensure data integrity
- [**Check Point**](https://www.checkpoint.com/about-us/copyright-and-trademarks/), a cybersecurity company specializing in threat prevention and network security solutions, offering a range of products designed to protect enterprises from cyber threats and ensure data integrity
- [**Microsoft Office for Mac**](https://officecdnmac.microsoft.com/pr/legal/mac/OfficeforMacAttributions.html), a suite of productivity applications developed by Microsoft for macOS, including tools for word processing, spreadsheets, and presentations
- [**Microsoft Teams**](https://www.microsoft.com/microsoft-teams/), a team collaboration application offering workspace chat and video conferencing, file storage, and integration of proprietary and third-party applications and services
- [**Nexthink Infinity**](https://docs.nexthink.com/legal/services-terms/experience-open-source-software-licenses/infinity-2022.8-software-licenses): a digital employee experience management platform for monitoring and improving IT performance
- [**Sophos Connect Client**](https://docs.sophos.com/nsg/licenses/SophosConnect/SophosConnectAttribution.html): a secure VPN client from Sophos that allows remote users to connect to their corporate network, ensuring secure access to resources and data
- [**Stonebranch**](https://stonebranchdocs.atlassian.net/wiki/spaces/UA77/pages/799545647/Licenses+for+Third-Party+Libraries): a cloud-based cybersecurity solution that integrates backup, disaster recovery, and cybersecurity features to protect data and ensure business continuity for organizations
- [**Tablecruncher**](https://tablecruncher.com/): a data analysis tool that allows users to import, analyze, and visualize spreadsheet data, offering interactive features for better insights and decision-making
- [**Nexthink Infinity**](https://docs.nexthink.com/legal/services-terms/experience-open-source-software-licenses/infinity-2022.8-software-licenses), a digital employee experience management platform for monitoring and improving IT performance
- [**Sophos Connect Client**](https://docs.sophos.com/nsg/licenses/SophosConnect/SophosConnectAttribution.html), a secure VPN client from Sophos that allows remote users to connect to their corporate network, ensuring secure access to resources and data
- [**Stonebranch**](https://stonebranchdocs.atlassian.net/wiki/spaces/UA77/pages/799545647/Licenses+for+Third-Party+Libraries), a cloud-based cybersecurity solution that integrates backup, disaster recovery, and cybersecurity features to protect data and ensure business continuity for organizations
- [**Tablecruncher**](https://tablecruncher.com/), a data analysis tool that allows users to import, analyze, and visualize spreadsheet data, offering interactive features for better insights and decision-making
- [**magicplan**](https://help.magicplan.app/acknowledgments), a mobile application for creating floor plans and interior designs using augmented reality
## Databases and Big Data
- [**ADIOS2**](https://code.ornl.gov/ecpcitest/adios2/-/tree/pr4285_FFSUpstream/thirdparty/nlohmann_json?ref_type=heads): a data management framework designed for high-performance input and output operations
- [**Cribl Stream**](https://docs.cribl.io/stream/third-party-current-list/): a real-time data processing platform that enables organizations to collect, route, and transform observability data, enhancing visibility and insights into their systems
- [**ADIOS2**](https://code.ornl.gov/ecpcitest/adios2/-/tree/pr4285_FFSUpstream/thirdparty/nlohmann_json?ref_type=heads), a data management framework designed for high-performance input and output operations
- [**Cribl Stream**](https://docs.cribl.io/stream/third-party-current-list/), a real-time data processing platform that enables organizations to collect, route, and transform observability data, enhancing visibility and insights into their systems
- [**DB Browser for SQLite**](https://github.com/sqlitebrowser/sqlitebrowser), a visual open-source tool for creating, designing, and editing SQLite database files
- [**MySQL Connector/C++**](https://docs.oracle.com/cd/E17952_01/connector-cpp-9.1-license-com-en/license-opentelemetry-cpp-com.html), a C++ library for connecting and interacting with MySQL databases
- [**MySQL NDB Cluster**](https://downloads.mysql.com/docs/licenses/cluster-9.0-com-en.pdf), a distributed database system that provides high availability and scalability for MySQL databases
- [**MySQL Shell**](https://downloads.mysql.com/docs/licenses/mysql-shell-8.0-gpl-en.pdf), an advanced client and code editor for interacting with MySQL servers, supporting SQL, Python, and JavaScript
- [**PrestoDB**](https://github.com/prestodb/presto), a distributed SQL query engine designed for large-scale data analytics, originally developed by Facebook
- [**ROOT Data Analysis Framework**](https://root.cern/doc/v614/classnlohmann_1_1basic__json.html), an open-source data analysis framework widely used in high-energy physics and other fields for data processing and visualization
- [**WiredTiger**](https://github.com/wiredtiger/wiredtiger), a high-performance storage engine for databases, offering support for compression, concurrency, and checkpointing
## Simulation and Modeling
@@ -134,30 +145,33 @@ the result of an internet search. If you know further customers of the library,
- [**azul**](https://pure.tudelft.nl/ws/files/85338589/tgis.12673.pdf), a fast and efficient 3D city model viewer designed for visualizing urban environments and spatial data
- [**Blender**](https://projects.blender.org/blender/blender/search?q=nlohmann), a free and open-source 3D creation suite for modeling, animation, rendering, and more
- [**cpplot**](https://cpplot.readthedocs.io/en/latest/library_api/function_eigen_8h_1ac080eac0541014c5892a55e41bf785e6.html), a library for creating interactive graphs and charts in C++, which can be viewed in web browsers
- [**Foundry Nuke**](https://learn.foundry.com/nuke/content/misc/studio_third_party_libraries.html), a powerful node-based digital compositing and visual effects application used in film and television post-production
- [**GAMS**](https://www.gams.com/47/docs/THIRDPARTY.html), a high-performance mathematical modeling system for optimization and decision support
- [**Kitware SMTK**](https://github.com/Kitware/SMTK), a software toolkit for managing simulation models and workflows in scientific and engineering applications
- [**M-Star**](https://docs.mstarcfd.com/3_Licensing/thirdparty-licenses.html), a computational fluid dynamics software for simulating and analyzing fluid flow
- [**MapleSim CAD Toolbox**](https://www.maplesoft.com/support/help/MapleSim/view.aspx?path=CADToolbox/copyright), a software extension for MapleSim that integrates CAD models, allowing users to import, manipulate, and analyze 3D CAD data within the MapleSim environment for enhanced modeling and simulation
- [**NVIDIA Omniverse**](https://docs.omniverse.nvidia.com/composer/latest/common/product-licenses/usd-explorer/usd-explorer-2023.2.0-licenses-manifest.html), a platform for 3D content creation and collaboration that enables real-time simulations and interactive experiences across various industries
- [**Pixar Renderman**](https://rmanwiki-26.pixar.com/space/REN26/19662083/Legal+Notice), a photorealistic 3D rendering software developed by Pixar, widely used in the film industry for creating high-quality visual effects and animations
- [**ROS - Robot Operating System**](http://docs.ros.org/en/noetic/api/behaviortree_cpp/html/json_8hpp_source.html), a set of software libraries and tools that assist in developing robot applications
- [**UBS**](https://www.ubs.com/), a multinational financial services and banking company
- [**GAMS**](https://www.gams.com/47/docs/THIRDPARTY.html): a high-performance mathematical modeling system for optimization and decision support
- [**M-Star**](https://docs.mstarcfd.com/3_Licensing/thirdparty-licenses.html): a computational fluid dynamics software for simulating and analyzing fluid flow
- [**MapleSim CAD Toolbox**](https://www.maplesoft.com/support/help/MapleSim/view.aspx?path=CADToolbox/copyright): a software extension for MapleSim that integrates CAD models, allowing users to import, manipulate, and analyze 3D CAD data within the MapleSim environment for enhanced modeling and simulation
- [**Kitware SMTK**](https://github.com/Kitware/SMTK): a software toolkit for managing simulation models and workflows in scientific and engineering applications
## Enterprise and Cloud Applications
- [**Acronis Cyber Protect Cloud**](https://care.acronis.com/s/article/59533-Third-party-software-used-in-Acronis-Cyber-Protect-Cloud?language=en_US): an all-in-one data protection solution that combines backup, disaster recovery, and cybersecurity to safeguard business data from threats like ransomware
- [**Baereos**](https://gitlab.tiger-computing.co.uk/packages/bareos/-/blob/tiger/bullseye/third-party/CLI11/examples/json.cpp): a backup solution that provides data protection and recovery options for various environments, including physical and virtual systems
- [**Acronis Cyber Protect Cloud**](https://care.acronis.com/s/article/59533-Third-party-software-used-in-Acronis-Cyber-Protect-Cloud?language=en_US), an all-in-one data protection solution that combines backup, disaster recovery, and cybersecurity to safeguard business data from threats like ransomware
- [**Baereos**](https://gitlab.tiger-computing.co.uk/packages/bareos/-/blob/tiger/bullseye/third-party/CLI11/examples/json.cpp), a backup solution that provides data protection and recovery options for various environments, including physical and virtual systems
- [**Bitdefender Home Scanner**](https://www.bitdefender.de/site/Main/view/home-scanner-open-source.html), a tool from Bitdefender that scans devices for malware and security threats, providing a safeguard against potential online dangers
- [**Citrix Provisioning**](https://docs.citrix.com/en-us/provisioning/2203-ltsr/downloads/pvs-third-party-notices-2203.pdf): a solution that streamlines the delivery of virtual desktops and applications by allowing administrators to manage and provision resources efficiently across multiple environments
- [**Citrix Provisioning**](https://docs.citrix.com/en-us/provisioning/2203-ltsr/downloads/pvs-third-party-notices-2203.pdf), a solution that streamlines the delivery of virtual desktops and applications by allowing administrators to manage and provision resources efficiently across multiple environments
- [**Citrix Virtual Apps and Desktops**](https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/2305/downloads/third-party-notices-apps-and-desktops.pdf), a solution from Citrix that delivers virtual apps and desktops
- [**Cyberarc**](https://docs.cyberark.com/Downloads/Legal/Privileged%20Session%20Manager%20for%20SSH%20Third-Party%20Notices.pdf): a security solution that specializes in privileged access management, enabling organizations to control and monitor access to critical systems and data, thereby enhancing overall cybersecurity posture
- [**Elster**](https://www.secunet.com/en/about-us/press/article/elstersecure-bietet-komfortablen-login-ohne-passwort-dank-secunet-protect4use): a digital platform developed by German tax authorities for secure and efficient electronic tax filing and management using secunet protect4use
- [**Egnyte Desktop**](https://helpdesk.egnyte.com/hc/en-us/articles/360007071732-Third-Party-Software-Acknowledgements): a secure cloud storage solution designed for businesses, enabling file sharing, collaboration, and data management across teams while ensuring compliance and data protection
- [**Cyberarc**](https://docs.cyberark.com/Downloads/Legal/Privileged%20Session%20Manager%20for%20SSH%20Third-Party%20Notices.pdf), a security solution that specializes in privileged access management, enabling organizations to control and monitor access to critical systems and data, thereby enhancing overall cybersecurity posture
- [**Egnyte Desktop**](https://helpdesk.egnyte.com/hc/en-us/articles/360007071732-Third-Party-Software-Acknowledgements), a secure cloud storage solution designed for businesses, enabling file sharing, collaboration, and data management across teams while ensuring compliance and data protection
- [**Elster**](https://www.secunet.com/en/about-us/press/article/elstersecure-bietet-komfortablen-login-ohne-passwort-dank-secunet-protect4use), a digital platform developed by German tax authorities for secure and efficient electronic tax filing and management using secunet protect4use
- [**Ethereum Solidity**](https://github.com/ethereum/solidity), a high-level, object-oriented programming language designed for implementing smart contracts on the Ethereum platform
- [**Inciga**](https://fossies.org/linux/icinga2/third-party/nlohmann_json/json.hpp): a monitoring tool for IT infrastructure, designed to provide insights into system performance and availability through customizable dashboards and alerts
- [**Intel Accelerator Management Daemon for VMware ESXi**](https://downloadmirror.intel.com/772507/THIRD-PARTY.txt): a management tool designed for monitoring and controlling Intel hardware accelerators within VMware ESXi environments, optimizing performance and resource allocation
- [**Inciga**](https://fossies.org/linux/icinga2/third-party/nlohmann_json/json.hpp), a monitoring tool for IT infrastructure, designed to provide insights into system performance and availability through customizable dashboards and alerts
- [**Intel Accelerator Management Daemon for VMware ESXi**](https://downloadmirror.intel.com/772507/THIRD-PARTY.txt), a management tool designed for monitoring and controlling Intel hardware accelerators within VMware ESXi environments, optimizing performance and resource allocation
- [**Juniper Identity Management Service**](https://www.juniper.net/documentation/us/en/software/jims/jims-guide/jims-guide.pdf)
- [**Microsoft Azure IoT SDK**](https://library.e.abb.com/public/2779c5f85f30484192eb3cb3f666a201/IP%20Gateway%20Open%20License%20Declaration_9AKK108467A4095_Rev_C.pdf), a collection of tools and libraries to help developers connect, build, and deploy Internet of Things (IoT) solutions on the Azure cloud platform
- [**Microsoft WinGet**](https://github.com/microsoft/winget-cli), a command-line utility included in the Windows Package Manager
- [**Pointr**](https://docs-dev.pointr.tech/docs/8.x/Developer%20Portal/Open%20Source%20Licenses/): a platform for indoor positioning and navigation solutions, offering tools and SDKs for developers to create location-based applications
- [**secunet protect4use**](https://www.secunet.com/en/about-us/press/article/elstersecure-bietet-komfortablen-login-ohne-passwort-dank-secunet-protect4use): a secure, passwordless multifactor authentication solution that transforms smartphones into digital keyrings, ensuring high security for online services and digital identities
- [**plexusAV**](https://www.sisme.com/media/10994/manual_plexusav-p-avn-4-form8244-c.pdf), a high-performance AV-over-IP transceiver device capable of video encoding and decoding using the IPMX standard
- [**Pointr**](https://docs-dev.pointr.tech/docs/8.x/Developer%20Portal/Open%20Source%20Licenses/), a platform for indoor positioning and navigation solutions, offering tools and SDKs for developers to create location-based applications
- [**secunet protect4use**](https://www.secunet.com/en/about-us/press/article/elstersecure-bietet-komfortablen-login-ohne-passwort-dank-secunet-protect4use), a secure, passwordless multifactor authentication solution that transforms smartphones into digital keyrings, ensuring high security for online services and digital identities
- [**Sencore MRD 7000**](https://www.foccusdigital.com/wp-content/uploads/2025/03/MRD-7000-Manual-8175V.pdf), a professional multi-channel receiver and decoder supporting UHD and HD stream decoding

View File

@@ -900,3 +900,13 @@ A JSON Patch operation 'test' failed. The unsuccessful operation is also printed
```
[json.exception.other_error.501] unsuccessful: {"op":"test","path":"/baz","value":"bar"}
```
### json.exception.other_error.502
This exception is thrown when a null pointer is passed as SAX event listener to the [sax_parse](../api/basic_json/sax_parse.md) function.
!!! failure "Example message"
```
[json.exception.other_error.502] SAX handler must not be null
```

View File

@@ -4,7 +4,7 @@
The class is licensed under the [MIT License](https://opensource.org/licenses/MIT):
Copyright &copy; 2013-2025 [Niels Lohmann](https://nlohmann.me)
Copyright &copy; 2013-2026 [Niels Lohmann](https://nlohmann.me)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@@ -251,7 +251,7 @@ http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a0a45fc74063
- Fixed typos and broken links in README. #1417 #1423 #1425 #1451 #1455 #1491
- Fixed documentation of parse function. #1473
- Suppressed warning that cannot be fixed inside the library. #1401 #1468
- Imroved package manager suppert:
- Improved package manager suppert:
- Updated Buckaroo instructions. #1495
- Improved Meson support. #1463
- Added Conda package manager documentation. #1430
@@ -685,7 +685,7 @@ After almost a year, here is finally a new release of JSON for Modern C++, and i
This section describes changes that change the public API of the library and may require changes in code using a previous version of the library. In section "Moving from 2.x.x to 3.0.0" at the end of the release notes, we describe in detail how existing code needs to be changed.
- The library now uses [**user-defined exceptions**](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9a0aced019cb1d65bb49703406c84970.html#a9a0aced019cb1d65bb49703406c84970) instead of re-using those defined in `<stdexcept>` (#244). This not only allows to add more information to the exceptions (every exception now has an identifier, and parse errors contain the position of the error), but also to easily catch all library exceptions with a single `catch(json::exception)`.
- The library now uses [**user-defined exceptions**](http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9a0aced019cb1d65bb49703406c84970.html#a9a0aced019cb1d65bb49703406c84970) instead of reusing those defined in `<stdexcept>` (#244). This not only allows to add more information to the exceptions (every exception now has an identifier, and parse errors contain the position of the error), but also to easily catch all library exceptions with a single `catch(json::exception)`.
- When strings with a different encoding as UTF-8 were stored in JSON values, their serialization could not be parsed by the library itself, as only UTF-8 is supported. To enforce this library limitation and improve consistency, **non-UTF-8 encoded strings now yield a `json::type_error` exception during serialization** (#838). The check for valid UTF-8 is realized with code from [Björn Hoehrmann](http://bjoern.hoehrmann.de/).
- **NaN and infinity values can now be stored inside the JSON value** without throwing an exception. They are, however, still serialized as `null` (#388).
- The library's iterator tag was changed from RandomAccessIterator to **[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator)** (#593). Supporting RandomAccessIterator was incorrect as it assumed an ordering of values in a JSON objects which are unordered by definition.
@@ -1185,7 +1185,7 @@ As `noexcept` and `constexpr` specifier have been added to several functions, th
This release fixes several small bugs and adds functionality in a backwards-compatible manner. Compared to the [last version (1.0.0)](https://github.com/nlohmann/json/releases/tag/v1.0.0), the following changes have been made:
### Changes
- _Fixed_: **Floating-point numbers** are now serialized and deserialized properly such that rountripping works in more cases. [#185, #186, #190, #191, #194]
- _Fixed_: **Floating-point numbers** are now serialized and deserialized properly such that roundtripping works in more cases. [#185, #186, #190, #191, #194]
- _Added_: The code now contains **assertions** to detect undefined behavior during development. As the standard function `assert` is used, the assertions can be switched off by defining the preprocessor symbol `NDEBUG` during compilation. [#168]
- _Added_: It is now possible to get a **reference** to the stored values via the newly added function `get_ref()`. [#128, #184]
- _Fixed_: Access to object values via keys (**`operator[]`**) now works with all kind of string representations. [#171, #189]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@@ -187,7 +187,7 @@ conversions with calls to [`get`](../api/basic_json/get.md), [`get_to`](../api/b
```cpp
nlohmann::json j = "Hello, world!";
auto s = j.template get<std::string>();
auto s = j.get<std::string>();
```
=== "Future-proof (alternative)"

View File

@@ -1,6 +1,6 @@
# Package Managers
<center>
<p markdown style="text-align: center">
![Homebrew](../images/package_managers/homebrew.svg){: style="height:1em"}&nbsp;[**Homebrew**](#homebrew) `nlohmann-json` &emsp;
![Meson](../images/package_managers/meson.svg){: style="height:1em"}&nbsp;[**Meson**](#meson) `nlohmann_json` &emsp;
![Bazel](../images/package_managers/bazel.svg){: style="height:1em"}&nbsp;[**Bazel**](#bazel) `nlohmann_json`<br>
@@ -15,7 +15,7 @@
![MacPorts](../images/package_managers/macports.svg){: style="height:1em"}&nbsp;[**MacPorts**](#macports) `nlohmann-json`<br>
![cpm.cmake](../images/package_managers/CPM.png){: style="height:1em"}&nbsp;[**CPM.cmake**](#cpmcmake) `gh:nlohmann/json`
![xmake](../images/package_managers/xmake.svg){: style="height:1em"}&nbsp;[**xmake**](#xmake) `nlohmann_json`
</center>
</p>
## Running example
@@ -38,7 +38,7 @@ When executed, this program should create output similar to
formula: [**`nlohmann-json`**](https://formulae.brew.sh/formula/nlohmann-json)
- [![Homebrew package](https://repology.org/badge/version-for-repo/homebrew/nlohmann-json.svg)](https://repology.org/project/nlohmann-json/versions)
- :octicons-tag-24: Availalbe versions: current version and development version (with `--HEAD` parameter)
- :octicons-tag-24: Available versions: current version and development version (with `--HEAD` parameter)
- :octicons-rocket-24: The formula is updated with every release.
- :octicons-person-24: Maintainer: Niels Lohmann
- :octicons-file-24: File issues at the [Homebrew issue tracker](https://github.com/Homebrew/homebrew-core/issues)
@@ -103,7 +103,7 @@ The header can be used directly in your code or via CMake.
wrap: **`nlohmann_json`**
- :octicons-tag-24: Availalbe versions: current version and select older versions (see
- :octicons-tag-24: Available versions: current version and select older versions (see
[WrapDB](https://mesonbuild.com/Wrapdb-projects.html))
- :octicons-rocket-24: The package is update automatically from file
[`meson.build`](https://github.com/nlohmann/json/blob/develop/meson.build).
@@ -195,7 +195,7 @@ repository can be referenced within a `MODULE.bazel` by rules such as `archive_o
recipe: [**`nlohmann_json`**](https://conan.io/center/recipes/nlohmann_json)
- [![ConanCenter package](https://repology.org/badge/version-for-repo/conancenter/nlohmann-json.svg)](https://repology.org/project/nlohmann-json/versions)
- :octicons-tag-24: Availalbe versions: current version and older versions (see
- :octicons-tag-24: Available versions: current version and older versions (see
[Conan Center](https://conan.io/center/recipes/nlohmann_json))
- :octicons-rocket-24: The package is update automatically via
[this recipe](https://github.com/conan-io/conan-center-index/tree/master/recipes/nlohmann_json).
@@ -241,7 +241,7 @@ requires, where `x.y.z` is the release version you want to use.
package: [**`nlohmann-json`**](https://packages.spack.io/package.html?name=nlohmann-json)
- [![Spack package](https://repology.org/badge/version-for-repo/spack/nlohmann-json.svg)](https://repology.org/project/nlohmann-json/versions)
- :octicons-tag-24: Availalbe versions: current version and older versions (see
- :octicons-tag-24: Available versions: current version and older versions (see
[Spack package](https://packages.spack.io/package.html?name=nlohmann-json))
- :octicons-rocket-24: The package is updated with every release.
- :octicons-person-24: Maintainer: [Axel Huebl](https://github.com/ax3l)
@@ -294,7 +294,7 @@ Please see the [Spack project](https://github.com/spack/spack) for any issues re
package: [**`nlohmann_json`**](https://hunter.readthedocs.io/en/latest/packages/pkg/nlohmann_json.html)
- :octicons-tag-24: Availalbe versions: current version and older versions (see
- :octicons-tag-24: Available versions: current version and older versions (see
[Hunter package](https://hunter.readthedocs.io/en/latest/packages/pkg/nlohmann_json.html))
- :octicons-rocket-24: The package is updated with every release.
- :octicons-file-24: File issues at the [Hunter issue tracker](https://github.com/cpp-pm/hunter/issues)
@@ -342,7 +342,7 @@ Please see the Hunter project for any issues regarding the packaging.
package: [**`nlohmann-json`**](https://github.com/Microsoft/vcpkg/tree/master/ports/nlohmann-json)
- [![Vcpkg package](https://repology.org/badge/version-for-repo/vcpkg/nlohmann-json.svg)](https://repology.org/project/nlohmann-json/versions)
- :octicons-tag-24: Availalbe versions: current version
- :octicons-tag-24: Available versions: current version
- :octicons-rocket-24: The package is updated with every release.
- :octicons-file-24: File issues at the [vcpkg issue tracker](https://github.com/microsoft/vcpkg/issues)
- :octicons-question-24: [vcpkg website](https://vcpkg.io/)
@@ -387,7 +387,7 @@ and follow the then displayed descriptions. Please see the vcpkg project for any
package: [**`nlohmann/json`**](https://github.com/pfultz2/cget-recipes/blob/master/recipes/nlohmann/json/package.txt)
- :octicons-tag-24: Availalbe versions: current version and older versions
- :octicons-tag-24: Available versions: current version and older versions
- :octicons-rocket-24: The package is updated with every release.
- :octicons-file-24: File issues at the [cget issue tracker](https://github.com/pfultz2/cget-recipes/issues)
- :octicons-question-24: [cget website](https://cget.readthedocs.io/)
@@ -438,7 +438,7 @@ installed by adding the `-DJSON_MultipleHeaders=ON` flag (i.e., `cget install nl
package: **`nlohmann/json`**
- :octicons-tag-24: Availalbe versions: current version and older versions
- :octicons-tag-24: Available versions: current version and older versions
- :octicons-rocket-24: The package is updated with every release.
- :octicons-file-24: File issues at the [library issue tracker](https://github.com/nlohmann/json/issues)
- :octicons-question-24: [Xcode documentation](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app)
@@ -449,7 +449,7 @@ installed by adding the `-DJSON_MultipleHeaders=ON` flag (i.e., `cget install nl
package: [**`nlohmann.json`**](https://www.nuget.org/packages/nlohmann.json/)
- :octicons-tag-24: Availalbe versions: current and previous versions
- :octicons-tag-24: Available versions: current and previous versions
- :octicons-rocket-24: The package is updated with every release.
- :octicons-person-24: Maintainer: [Hani Kaabi](https://github.com/hnkb)
- :octicons-file-24: File issues at the [maintainer's issue tracker](https://github.com/hnkb/nlohmann-json-nuget/issues)
@@ -583,7 +583,7 @@ more information.
package: [**`nlohmann_json`**](https://anaconda.org/conda-forge/nlohmann_json)
- ![](https://img.shields.io/conda/v/conda-forge/nlohmann_json)
- :octicons-tag-24: Availalbe versions: current and previous versions
- :octicons-tag-24: Available versions: current and previous versions
- :octicons-rocket-24: The package is updated with every release.
- :octicons-file-24: File issues at the [feedstock's issue tracker](https://github.com/conda-forge/nlohmann_json-feedstock/issues)
- :octicons-question-24: [Conda documentation](https://docs.conda.io/projects/conda/en/stable/user-guide/getting-started.html)
@@ -640,7 +640,7 @@ If you are using [MSYS2](http://www.msys2.org/), you can use the [mingw-w64-nloh
port: [**`nlohmann-json`**](https://ports.macports.org/port/nlohmann-json/)
- [![MacPorts package](https://repology.org/badge/version-for-repo/macports/nlohmann-json.svg)](https://repology.org/project/nlohmann-json/versions)
- :octicons-tag-24: Availalbe versions: current version
- :octicons-tag-24: Available versions: current version
- :octicons-rocket-24: The port is updated with every release.
- :octicons-file-24: File issues at the [MacPorts issue tracker](https://trac.macports.org/newticket?port=nlohmann-json)
- :octicons-question-24: [MacPorts website](https://www.macports.org)
@@ -718,7 +718,7 @@ bdep new -t exe -l c++
package: **`gh:nlohmann/json`**
- :octicons-tag-24: Availalbe versions: current and previous versions
- :octicons-tag-24: Available versions: current and previous versions
- :octicons-rocket-24: The package is updated with every release.
- :octicons-file-24: File issues at the [CPM.cmake issue tracker](https://github.com/cpm-cmake/CPM.cmake/issues)
- :octicons-question-24: [CPM.cmake website](https://github.com/cpm-cmake/CPM.cmake)
@@ -762,7 +762,7 @@ CPMAddPackage("gh:nlohmann/json@3.12.0")
package: [**`nlohmann_json`**](https://github.com/xmake-io/xmake-repo/blob/master/packages/n/nlohmann_json/xmake.lua)
- :octicons-tag-24: Availalbe versions: current and previous versions
- :octicons-tag-24: Available versions: current and previous versions
- :octicons-rocket-24: The package is updated with every release.
- :octicons-file-24: File issues at the [xmake issue tracker](https://github.com/xmake-io/xmake-repo/issues)
- :octicons-question-24: [xmake website](https://xmake.io/#/)

View File

@@ -9,7 +9,7 @@ repo_url: https://github.com/nlohmann/json
edit_uri: edit/develop/docs/mkdocs/docs
# Copyright
copyright: Copyright &copy; 2013-2025 Niels Lohmann
copyright: Copyright &copy; 2013-2026 Niels Lohmann
# Configuration
theme:
@@ -77,6 +77,7 @@ nav:
- features/json_pointer.md
- features/json_patch.md
- features/merge_patch.md
- features/modules.md
- 'nlohmann Namespace': features/namespace.md
- features/object_order.md
- Parsing:
@@ -321,6 +322,7 @@ markdown_extensions:
guess_lang: false
- toc:
permalink: true
- md_in_html
- pymdownx.arithmatex
- pymdownx.betterem:
smart_enable: all

View File

@@ -1,11 +1,11 @@
wheel==0.45.1
wheel==0.46.3
mkdocs==1.6.1 # documentation framework
mkdocs-git-revision-date-localized-plugin==1.4.5 # plugin "git-revision-date-localized"
mkdocs-material==9.6.14 # theme for mkdocs
mkdocs-git-revision-date-localized-plugin==1.5.1 # plugin "git-revision-date-localized"
mkdocs-material==9.7.1 # theme for mkdocs
mkdocs-material-extensions==1.3.1 # extensions
mkdocs-minify-plugin==0.8.0 # plugin "minify"
mkdocs-redirects==1.2.2 # plugin "redirects"
mkdocs-htmlproofer-plugin==1.3.0 # plugin "htmlproofer"
mkdocs-htmlproofer-plugin==1.4.1 # plugin "htmlproofer"
PyYAML==6.0.2 # linter
PyYAML==6.0.3 # linter

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once
@@ -26,6 +26,7 @@
#include <nlohmann/detail/meta/identity_tag.hpp>
#include <nlohmann/detail/meta/std_fs.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
#include <nlohmann/detail/meta/logic.hpp>
#include <nlohmann/detail/string_concat.hpp>
#include <nlohmann/detail/value_t.hpp>
@@ -53,7 +54,8 @@ inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n)
}
#ifdef JSON_HAS_CPP_17
template<typename BasicJsonType, typename T>
template < typename BasicJsonType, typename T,
typename std::enable_if < !nlohmann::detail::is_basic_json<T>::value, int >::type = 0 >
void from_json(const BasicJsonType& j, std::optional<T>& opt)
{
if (j.is_null())
@@ -445,13 +447,36 @@ inline void from_json(const BasicJsonType& j, ArithmeticType& val)
}
}
template<typename BasicJsonType, typename... Args, std::size_t... Idx>
std::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> /*unused*/)
template<typename BasicJsonType, typename Type>
detail::uncvref_t<Type> from_json_tuple_get_impl(BasicJsonType&& j, detail::identity_tag<Type> /*unused*/, detail::priority_tag<0> /*unused*/)
{
return std::make_tuple(std::forward<BasicJsonType>(j).at(Idx).template get<Args>()...);
return std::forward<BasicJsonType>(j).template get<detail::uncvref_t<Type>>();
}
template<typename BasicJsonType>
template<typename BasicJsonType, typename Type,
detail::enable_if_t<detail::is_compatible_reference_type<BasicJsonType, Type>::value, int> = 0>
Type from_json_tuple_get_impl(BasicJsonType && j, detail::identity_tag<Type> /*unused*/, detail::priority_tag<1> /*unused*/)
{
return std::forward<BasicJsonType>(j).template get_ref<Type>();
}
template<typename BasicJsonType, typename Type,
detail::enable_if_t<std::is_arithmetic<uncvref_t<Type>>::value, int> = 0>
detail::uncvref_t<Type> from_json_tuple_get_impl(BasicJsonType && j, detail::identity_tag<Type> /*unused*/, detail::priority_tag<2> /*unused*/)
{
return std::forward<BasicJsonType>(j).template get<detail::uncvref_t<Type>>();
}
template<std::size_t PTagValue, typename BasicJsonType, typename... Types>
using tuple_type = std::tuple < decltype(from_json_tuple_get_impl(std::declval<BasicJsonType>(), detail::identity_tag<Types> {}, detail::priority_tag<PTagValue> {}))... >;
template<std::size_t PTagValue, typename... Args, typename BasicJsonType, std::size_t... Idx>
tuple_type<PTagValue, BasicJsonType, Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> /*unused*/)
{
return tuple_type<PTagValue, BasicJsonType, Args...>(from_json_tuple_get_impl(std::forward<BasicJsonType>(j).at(Idx), detail::identity_tag<Args> {}, detail::priority_tag<PTagValue> {})...);
}
template<std::size_t PTagValue, typename BasicJsonType>
std::tuple<> from_json_tuple_impl_base(BasicJsonType& /*unused*/, index_sequence<> /*unused*/)
{
return {};
@@ -473,13 +498,15 @@ inline void from_json_tuple_impl(BasicJsonType&& j, std::pair<A1, A2>& p, priori
template<typename BasicJsonType, typename... Args>
std::tuple<Args...> from_json_tuple_impl(BasicJsonType&& j, identity_tag<std::tuple<Args...>> /*unused*/, priority_tag<2> /*unused*/)
{
return from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});
static_assert(cxpr_and<cxpr_or<cxpr_not<std::is_reference<Args>>, is_compatible_reference_type<BasicJsonType, Args>>...>::value,
"Can not return a tuple containing references to types not contained in a Json, try Json::get_to()");
return from_json_tuple_impl_base<1, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});
}
template<typename BasicJsonType, typename... Args>
inline void from_json_tuple_impl(BasicJsonType&& j, std::tuple<Args...>& t, priority_tag<3> /*unused*/)
{
t = from_json_tuple_impl_base<BasicJsonType, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});
t = from_json_tuple_impl_base<2, Args...>(std::forward<BasicJsonType>(j), index_sequence_for<Args...> {});
}
template<typename BasicJsonType, typename TupleRelated>

View File

@@ -4,7 +4,7 @@
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2009 Florian Loitsch <https://florian.loitsch.com/>
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once
@@ -425,6 +425,25 @@ class binary_reader
@return whether a valid CBOR value was passed to the SAX parser
*/
template<typename NumberType>
bool get_cbor_negative_integer()
{
NumberType number{};
if (JSON_HEDLEY_UNLIKELY(!get_number(input_format_t::cbor, number)))
{
return false;
}
const auto max_val = static_cast<NumberType>((std::numeric_limits<number_integer_t>::max)());
if (number > max_val)
{
return sax->parse_error(chars_read, get_token_string(),
parse_error::create(112, chars_read,
exception_message(input_format_t::cbor, "negative integer overflow", "value"), nullptr));
}
return sax->number_integer(static_cast<number_integer_t>(-1) - static_cast<number_integer_t>(number));
}
bool parse_cbor_internal(const bool get_char,
const cbor_tag_handler_t tag_handler)
{
@@ -513,29 +532,16 @@ class binary_reader
return sax->number_integer(static_cast<std::int8_t>(0x20 - 1 - current));
case 0x38: // Negative integer (one-byte uint8_t follows)
{
std::uint8_t number{};
return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);
}
return get_cbor_negative_integer<std::uint8_t>();
case 0x39: // Negative integer -1-n (two-byte uint16_t follows)
{
std::uint16_t number{};
return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);
}
return get_cbor_negative_integer<std::uint16_t>();
case 0x3A: // Negative integer -1-n (four-byte uint32_t follows)
{
std::uint32_t number{};
return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1) - number);
}
return get_cbor_negative_integer<std::uint32_t>();
case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows)
{
std::uint64_t number{};
return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast<number_integer_t>(-1)
- static_cast<number_integer_t>(number));
}
return get_cbor_negative_integer<std::uint64_t>();
// Binary data (0x00..0x17 bytes follow)
case 0x40:
@@ -2944,7 +2950,7 @@ class binary_reader
success = false;
break;
}
result.push_back(static_cast<std::uint8_t>(current));
result.push_back(static_cast<typename binary_t::value_type>(current));
}
return success;
}

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once
@@ -14,6 +14,7 @@
#include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next
#include <memory> // shared_ptr, make_shared, addressof
#include <numeric> // accumulate
#include <streambuf> // streambuf
#include <string> // string, char_traits
#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer
#include <utility> // pair, declval
@@ -401,7 +402,7 @@ template<typename T>
struct is_iterator_of_multibyte
{
using value_type = typename std::iterator_traits<T>::value_type;
enum
enum // NOLINT(cppcoreguidelines-use-enum-class)
{
value = sizeof(value_type) > 1
};

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once
@@ -863,6 +863,8 @@ class lexer : public lexer_base<BasicJsonType>
break;
}
}
JSON_HEDLEY_UNREACHABLE();
}
// multi-line comments skip input until */ is read
@@ -898,6 +900,8 @@ class lexer : public lexer_base<BasicJsonType>
continue;
}
}
JSON_HEDLEY_UNREACHABLE();
}
// unexpected character after reading '/'

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2018 The Abseil Authors
// SPDX-License-Identifier: MIT

View File

@@ -3,7 +3,7 @@
// | | |__ | | | | | | version 3.12.0
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann <https://nlohmann.me>
// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#pragma once

Some files were not shown because too many files have changed in this diff Show More