3 ms·
Part of the confusion here is that writing '{"key": "value\nda"}' in python is NOT producing a string like this: {"key": "value\nda"} but instead like thi
by Doxin 1y ago
Part of the confusion here is that writing '{"key": "value\nda"}' in python is NOT producing a string like this:
{"key": "value\nda"}
but instead like this:
{"key": "value
da"}
you need to either double-escape it, or use raw strings. In python these both:
'{"key": "value\\nda"}'
r'{"key": "value\nda"}'
will produce the following string:
{"key": "value\nda"}