This commit is contained in:
nlohmann
2026-09-24 07:41:05 +00:00
parent 8539704c02
commit b090a9e4ab
277 changed files with 947 additions and 500 deletions
File diff suppressed because one or more lines are too long
+8
View File
@@ -80,6 +80,14 @@ When defined, the library will not create a compile error when a known unsupport
See [full documentation of `JSON_SKIP_UNSUPPORTED_COMPILER_CHECK`](https://json.nlohmann.me/api/macros/json_skip_unsupported_compiler_check/index.md).
## `JSON_STRICT_NUL_HANDLING`
When defined to `1`, a `'\0'` (NUL) byte anywhere in the input is rejected with `parse_error.101`, like any other unexpected byte, instead of being silently treated as end of input (see the [FAQ entry](https://json.nlohmann.me/home/faq/#nul-bytes-in-the-input) for background). The default value is `0`, which preserves the existing behavior; this is planned to become the default in version 4.0.0.
The strict handling can also be enabled with the CMake option [`JSON_StrictNulHandling`](https://json.nlohmann.me/integration/cmake/#json_strictnulhandling) (`OFF` by default) which sets `JSON_STRICT_NUL_HANDLING` accordingly.
See [full documentation of `JSON_STRICT_NUL_HANDLING`](https://json.nlohmann.me/api/macros/json_strict_nul_handling/index.md).
## `JSON_THROW_USER(exception)`
This macro overrides `throw` calls inside the library. The argument is the exception to be thrown.