JObject converts char to int
The following code runs in LinqPad (I mention this to explain the .Dump() method)
var x = new JObject {
["property1"] = 'a',
["property2"] = "A",
["property3"] = -1,
["property4"] = 9.9,
};
x.Dump();
This returns the following values:
97, A, -1, 9.9
How do I stop JSon.Net from converting the 'char' value as an integer?
var x = new JObject {
["property1"] = 'a',
["property2"] = "A",
["property3"] = -1,
["property4"] = 9.9,
};
x.Dump();
This returns the following values:
97, A, -1, 9.9
How do I stop JSon.Net from converting the 'char' value as an integer?
Комментарии
Отправить комментарий