I have JSON file coming from 3rd party systems where all "string", "double" and "Boolean" comes as double quote as string data.
[{"Key":"Key1","Value":"Value1"},{"Key":"Key2","Value":"80"},{"Key":"Key3","Value":"true"}]
I need to convert accordingly to double, boolean and string, I have defined a class like, value as "object"
public class Data
{
public string Key { get; set; }
public object Value { get; set; }
}
and deserialize the data like,
var data = JsonConvert.DeserializeObject<List<Data>>(File.ReadAllText(@"C:\TEMP\data.json"));
but the value is coming in double quote as this treats as string ,
How to do the conversion so that double and boolean value comes without double quote,
>>(File.ReadAllText(@"C:\TEMP\data.json"));`
– PeterG Dec 08 '20 at 10:44