Podger2016 / rapidjson

Automatically exported from code.google.com/p/rapidjson
0 stars 0 forks source link

'\' in value returns ERROR: Unknown escape character #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
 rapidjson::Document doc;
 doc.Parse<0>(std::string::jsonIn.c_str());
 if (doc.HasParseError())
   {
      cerr << "ERROR: " << doc.GetParseError() << endl;
   }

What is the expected output? What do you see instead?
"ERROR: Unknown escape character"

What version of the product are you using? On what operating system?
0.11

Please provide any additional information below.
JSON:
{
   "DataDir":"E:\Something"
}

Original issue reported on code.google.com by patle...@gmail.com on 7 Dec 2012 at 10:18

GoogleCodeExporter commented 8 years ago
This error is correct.

"\S" is invalid JSON string. Need "E:\\Something".

You may use a JSON validator online to verify this.

Original comment by milo...@gmail.com on 8 Dec 2012 at 1:59

GoogleCodeExporter commented 8 years ago
Yes you are right, I didn't know that. Sorry for the bug report then.

Original comment by patle...@gmail.com on 8 Dec 2012 at 1:14