I'm trying to desarialize a simple json array and bind it a model like this:
JSON
[{
"id": "311697",
"km": "36.00",
"start": "2015-12-07",
"end": "2015-12-07",
}, {
"id": "311697",
"km": "36.00",
"start": "2015-12-07",
"end": "2015-12-07",
}]
Model
public class SalModel
{
public string id{ get; set; }
public float km{ get; set; }
public string start{ get; set; }
public string end{ get; set; }
}
And, to get the array I'm using:
var json = new WebClient().DownloadString(url);
At this time, the array is perfectly.
But, any time that I'm trying to use json.net
library:
with methods like:
var result = JsonConvert.DeserializeObject<List<SalModel>>(json);
I can't debug this method, and I get an error like:
Not is possible load the file or assembly 'Newtonsoft.Json' Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' and any of the dependencies. The assembly's manifest definition does not match the reference to the assembly.