json
json copied to clipboard
ParseAnonymousValue issue
I cannot understand that str.Replace("\\", string.Empty); at 283 line in JSONParser.cs
When I try to parse {"abc": "he\rllo"},I got {"abc": "herllo"}
Same issue .. I guess I remove that line and see if I encounter any issues. @yangruihan have you done this already, was it working for you?
Ok this fix seems to work for me: Replace "anonymous string parsing" with function that does "known string parsing".
Before:
{ string str = json.Substring(1, json.Length - 2); return str.Replace("\\", string.Empty); }
after:
{ return ParseValue(typeof(string), json); }