How to avoid escaping for an already escaped string in .dump() #2871
Answered
by
nlohmann
BrandonLiang
asked this question in
Q&A
-
As titled. i have the following mapping in the json object: now, if i do obj.dump(), it will double escape -> “\\\”some text\\nanother text\\\”” due to the default escaping. i wonder if anyone else has run into this issue and how you resolve it. Thanks! (As a side not, i would like to see an update to include an optional bool param to turn off the default escape option for .dump().) |
Beta Was this translation helpful? Give feedback.
Answered by
nlohmann
Jul 15, 2021
Replies: 1 comment 6 replies
-
There is no way to switch off this escaping as it is required by JSON. |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
nlohmann
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no way to switch off this escaping as it is required by JSON.