mirror of
https://github.com/nlohmann/json.git
synced 2026-07-10 04:25:11 +00:00
deploy: fe0299545a
This commit is contained in:
@@ -45,6 +45,15 @@ This implementation is interoperable as it does compare strings code unit by cod
|
||||
String values are stored as pointers in a `basic_json` type. That is, for any access to string values, a pointer of type
|
||||
`string_t*` must be dereferenced.
|
||||
|
||||
#### Cross-`basic_json` conversion requirements
|
||||
|
||||
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.
|
||||
|
||||
## Examples
|
||||
|
||||
??? example
|
||||
|
||||
Reference in New Issue
Block a user