Closed jigneshkvp closed 7 years ago
Invalid for now, looking more into the exact issue.
Are you still encountering issues with the deserialization? And be sure to try using the latest code in the repo rather than using the nuget package if possible.
Thanks,
Hello @rpgmaker,
I am still encountering the issue. You can test it as per my comments. I am currently on version - 1.2.1.10
I can deserialize the same string using Newtonsoft.Json
Thanks for the update. I will look into why it thinks it's an invalid JSON.
Sorry I have not had a chance to work on this. I will try to work on it this upcoming week. Thanks
Hello @rpgmaker, Any update on the fix for this issue?
Sorry, was busy through the week. I would try to resolve it tonight.
Thanks,
So you do have an invalid json. I don't support non quoted string for the key in the json.
So instead of this
"{ Val : \"\\"sampleValue\\"\"}"
use this:
"{ \"Val\" : \"\\"sampleValue\\"\"}"
I did find a bug in the code with quoted string which i fixed and will be pushing soon.
In order for me to support non quoted string I will have to play with the code to see what changes needs to be done. According to standards, keys are suppose to be string to make it easier to read them.
Hi @rpgmaker,
I tried as per your comments, modified the code to be:
var stringToDeserialize = "{ \"Val\" : \"\\\"sampleValue\\\"\"}";
There was no exception, but the result was wierd: the string "Val" contained this value:
"\"sampleValue\"}\0\0\0耀ﳌJ\a\0Run {0}\0\0\0ш\u0a7d\0\0風ӓ\0\0\0\0\0\0\u0005\0\0\0"
In case of Newtonsoft.Json, the output was as expected: "\"sampleValue\""
Did you use the latest code too? I fixed it in this commit for this issue
Thanks,
I updated to latest code and tested it, works fine and lightning fast! :+1:
Hello,
NetJSON is unable to deserialize string value containing double quotes.
Data to replicate: