Question:
What is the best way to pull JSON from a .json file on my server, into code, so it can be deserialized into a .NET object?
Details:
I have a file called "backlog.json" saved in my VS2013 Express MVC project. The file was not created by my project - it has been added to the project by doing "Add Existing Item."
"backlog.json" is a collection of json objects. I need to pull these objects from the collection, so I can add to the database my project uses and manipulate with my project.
The project uses .NET Framework 4.5, and I've added NewtonSoft's Json.NET to the project, using NuGet package manager. Once I get the objects from "backlog.json" into my code, I'll use Json.NET to deserialize and manipulate the objects through C#.
For example, something like:
public void AddJSON(EFWorkOrderModelContainer WorkOrderContainer)
{
// Pull backlog.json from C:\Project\App_Data\backlog.json
// De-serialize and parse
}