How to preserve newlines when importing json via loaddata

Viewed 17

I have an object that uses \r\n line breaks in a CharField.

When I export using dumpdata it provides valid json:

{
    "mykey": "example\r\nsentence\r\nhere"
}

However when I import again using loaddata the CharField is stripped of newlines.

How do I preserve them?

0 Answers
Related