0

I just want to store the markdown text in a JSON string. Is it ok for me to simply copy the text into the string or do I have to manually escape certain characters?

I know that JSON uses certain characters for formatting and I would like to know what characters would be in conflict.

What characters do I need to escape?

Thanks!

Blaze349
  • 419
  • 1
  • 5
  • 15
  • Have you _tried_ anything? You should be able to answer your own question in fairly short order… – Chris May 28 '17 at 21:36

1 Answers1

3

You should be fine to copy/paste. You will need to escape quotes with \", tabs with \t and backslashes with \\.

Kyle Berezin
  • 557
  • 4
  • 19
  • 4
    [JSON doesn't support multi-line strings, so newlines will have to be converted as well](https://stackoverflow.com/questions/2392766/multiline-strings-in-json). – Chris May 28 '17 at 21:38