Closed Finglas closed 9 years ago
When deserializing a string value that has been provided as a literal integer value then JSON.NET doesn't work in all cases. See the example below to reproduce.
I've added additional information at StackOverflow.
class Program { static void Main(string[] args) { Console.WriteLine("Sending in: \n43443333222211111117"); var largeBrokenNumber = JsonConvert.DeserializeObject<Foo>("{\"Blah\": 43443333222211111117 }"); Console.WriteLine(largeBrokenNumber.Blah); Console.WriteLine(); Console.WriteLine("Sending in: \n53443333222211111117"); var largeOddWorkingNumber = JsonConvert.DeserializeObject<Foo>("{\"Blah\": 53443333222211111117 }"); Console.WriteLine(largeOddWorkingNumber.Blah); } } public class Foo { public string Blah { get; set; } }
A few points to note:
This has been fixed. It will be in next release.
When deserializing a string value that has been provided as a literal integer value then JSON.NET doesn't work in all cases. See the example below to reproduce.
I've added additional information at StackOverflow.
A few points to note: