Should I need to use double backslash for special characters in JSON?


#1

Hi all,

I’ve read the following example and I am embarrasing at why \n is not acceptable. I think \n is just enough but they said it was wrong and use \\n instead?
Which one is correct?

Thanks in advance!

Question


#2

This forum is for usage of the http://jsonapi.org/ spec, it seems like this is a generic question about JSON as a format. I’d suggest you post to StackOverflow instead. Thanks!


#3