mirror of
https://github.com/nlohmann/json.git
synced 2026-11-12 15:10:47 +00:00
deploy: cdfb130fa6
This commit is contained in:
1 parent
8ddeea7128
commit
5097c20962
516 files changed
+7306
-5984
No files matched your search
@@ -60,9 +60,11 @@ String values are stored as pointers in a `basic_json` type. That is, for any ac
|
||||
When converting a string value from one `basic_json` specialization to another via the
|
||||
[converting constructor](basic_json.md) (overload 4), the target `string_t` must be directly
|
||||
constructible from the source `basic_json`'s `string_t` type. If this requirement is not met, the
|
||||
conversion does not fail; instead, the string is silently converted as an array of character codes,
|
||||
which is incorrect. See [issue #3425](https://github.com/nlohmann/json/issues/3425) for details
|
||||
and an example.
|
||||
conversion depends on the source string type. If it is a range of characters, the string is converted as an array of
|
||||
character codes, which is incorrect: the converting constructor's [`JSON_ASSERT`](../macros/json_assert.md) fails; with
|
||||
its default definition, `assert`, the program aborts unless `NDEBUG` is defined, in which case the array is returned.
|
||||
If the source string type is not a range of characters, the conversion does not compile at all. See
|
||||
[issue #3425](https://github.com/nlohmann/json/issues/3425) for details and an example.
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
Reference in new issue
Block a user