I’m making requests to my server using jQuery.post()
and my server is returning JSON objects (like { \"var\": \"value\", ... }
). However, if any of
If you need a single quote inside of a string, since \' is undefined by the spec, use \u0027
see http://www.utf8-chartable.de/ for all of them
edit: please excuse my misuse of the word backticks in the comments. I meant backslash. My point here is that in the event you have nested strings inside other strings, I think it can be more useful and readable to use unicode instead of lots of backslashes to escape a single quote. If you are not nested however it truly is easier to just put a plain old quote in there.