Swifter.Json
Swifter.Json copied to clipboard
deserialization will convert double value to string if value has no fraction
[TestMethod]
public void JsonTest()
{
double expected = 1.0;
string json= "{\"a\":1.0}";
var obj = JsonFormatter.DeserializeObject<Dictionary<string, object>>(json);
Assert.AreEqual(expected, obj["a"]);
}