I have an issue serializing a JSON string to a key/value dictionary. The code is like:
var parameters = "{\"id\":123}";
JsonConvert.DeserializeObject<Dictionary<string, string>>(parameters);
This example seems work perfectly, giving me {[id,123]}.
Now. When I change the number to something like '070809' I suddenly get an exception: "Newtonsoft.Json.JsonReaderException: Input string '070809' is not a valid number. Path 'id', line 1, position 12. ---> System.FormatException: Additional non-parsable characters are at the end of the string."
var parameters = "{\"id\":070809}";
JsonConvert.DeserializeObject<Dictionary<string, string>>(parameters);
Any suggestions?