Reputation: 13335
JavaScriptSerializer s = new JavaScriptSerializer();
result = s.Deserialize<Hashtable>(data);
Error is thrown if data is
"{a:\"\"test\" 123\",b:\"hello\" }"
No error is thrown if data is
"{a:\"test 123\",b:\"hello\" }"
How do I adjust the data string so that no error is thrown even when there are quotes?
Upvotes: 0
Views: 6358
Reputation: 12326
That shouldn't happen but try single quotes?
"{a:\"'test' 123\",b:\"hello\" }"
Or this:
'{a:"\"test\"" 123",b:"hello" }'
Upvotes: 1