This is probably not an issue specific to the JSON parser.
More likely, the issue is with how you are acquiring json
. It appears to be an encoding issue -- perhaps you are reading from a file which is using a Windows-1252 or ISO-8859-1 encoding, but the reader is treating it as UTF-8. Or vice versa.
WebClient.DownloadString
uses a supplied Encoding
to do this conversion. You need to set it explicitly:
public static UserItem DownloadJSONString(string urlJson)
{
using (WebClient wc = new WebClient())
{
wc.Encoding = Encoding.UTF8;
var json = wc.DownloadString(urlJson);
UserItem userItems = JsonConvert.DeserializeObject<RootObject>(json);
return userItems;
}
}