nlohmann/json

Missing newlines in deserialized string

Closed this issue · 0 comments

Description

No newlines in output string.

Reproduction steps

Compile example below with Visual Studio 2022 for x86

Expected vs. actual results

Expected :

Hello
World

Actual :
Hello World (space instead of newline)

Minimal code example

json main_json;
main_json["newlines"] = "Hello\nWorld!";
std::cout << main_json.dump() << std::endl;// -> "Hello\\nWorld"
std::cout << main_json["newlines"] << std::endl;// -> "Hello World"


### Error messages

```Shell
No

Compiler and operating system

Visual Studio 2022 Win10 sdk latest

Library version

6325839

Validation