-1

i Have CString str. for example contains this string: str = "hi there how are you. add me as your "friend"";

if you observe, you have \n and \" included in cstring. Json Parsing is not successful because of that \n and \". how do i replace them. also it should be language independent. please help.

user2059287
  • 15
  • 1
  • 8

1 Answers1

0

It appears the grammar is c/c++-like, so "\n" and "\"". Hence, in C++, the code would be "\\n" and "\\\"".

Check out http://www.json.org/

franji1
  • 3,088
  • 2
  • 23
  • 43