I want to read the json file data in my application, file is in D:\Projects\Trans\API, while debugging I'm getting the error:
Could not find file 'D:\projects\Trans\API\bin\Debug\alert.json'.
using Newtonsoft.Json;
string json = File.ReadAllText("alert.json");
dynamic jsonObj = JsonConvert.DeserializeObject(json);
jsonObj[0] = "1567629797772";
string output = JsonConvert.SerializeObject(jsonObj, Formatting.Indented);
File.WriteAllText("alert.json", output);
Json data:
{
"36c": "1567629797772",
"36a": "1567675661847",
"369": "1567669087138",
"36d": "1567664290851",
"36e": "1567675343047"
}