Closed fanno closed 1 year ago
Your JSON file is malformed. The backslashes need to be escaped.
https://www.json.org/json-en.html
A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A character is represented as a single character string. A string is very much like a C or Java string.
thanks, not sure how i managed to set it to this value via the interface.
Description
..... "Path": { "Log": "c:\path\to\Logs\" } .....
Reproduction steps
std::ifstream i(.....); m_json = nlohmann::json::parse(data);
if the file has the \ in the variable like shown in description it fails.
Expected vs. actual results
not sure if it should be like this ? or if i need to dome something myt self when i put \ in too a variable ?
if i do\ instead of \ then it parses fine..
this code seems to "fix" the issue
Minimal code example
Error messages
Compiler and operating system
windows 10
Library version
3.11.2 single file
Validation
develop
branch is used.