I am having problem when convert string to json object.
\n gives out Unterminated string . If I want to use new line I use \n character, then it occurs the error. Example String: Hello \n this is testing message.
double quote ” gives out Expected a ',' or '} Exception. Example String : This is a “TESTING” message.
I use to escape \ to escape those , but still facing the JSON Exception
I use the StringEscapeUtils.escapeJavaScript() function which make my life easy.
http://commons.apache.org/lang/api/org/apache/commons/lang3/StringEscapeUtils.html