Skip to content

Instantly share code, notes, and snippets.

@afreeland
Created January 17, 2013 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afreeland/4556172 to your computer and use it in GitHub Desktop.
Save afreeland/4556172 to your computer and use it in GitHub Desktop.
C#: Read and Deserialize JSON File
using (StreamReader sr = new StreamReader(Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Models", "JSON") + "/Menu.json"))
{
var response = sr.ReadToEnd();
taskbar = JSON.Deserialize<Menu.Taskbar>(response.ToString());
sr.Close();
sr.Dispose();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment