-
Close this question. I need to have a single backslash as a value in a JSON file. When the following line of code is executed: It creates:
Is there any workaround for this? Thanks Gene |
Beta Was this translation helpful? Give feedback.
Answered by
nlohmann
May 11, 2023
Replies: 1 comment
-
This is correct since backslashes need to be escaped. Try: std::string slash = data["key_fields"][0]["1"]["char"];
std::cout << slash << std::endl; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
geenweb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is correct since backslashes need to be escaped. Try: