I am attempting to use JSON.Net to load in a JSON file stored locally on an ASP.Net MVC 4 site, but am having trouble pointing to the file. Here is what I am trying to do:
You need to read in the JSON first using a FileStream.
Try this.
using(StreamReader sr = new StreamReader(Server.MapPath("~/Content/treatments.json")))
{
treatments = JsonConvert.DeserializeObject>(sr.ReadToEnd());
}