Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid escaping for an already escaped string in .dump() #2870

Closed
BrandonLiang opened this issue Jul 15, 2021 · 0 comments
Closed

How to avoid escaping for an already escaped string in .dump() #2870

BrandonLiang opened this issue Jul 15, 2021 · 0 comments

Comments

@BrandonLiang
Copy link

BrandonLiang commented Jul 15, 2021

As titled.

i have the following mapping in the json object:
obj[“text”] = “\”some text\nanother text\””

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().)

Repository owner locked and limited conversation to collaborators Jul 15, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants