Skip to content

Instantly share code, notes, and snippets.

@copyleftdev
Created November 24, 2015 20:39
Show Gist options
  • Select an option

  • Save copyleftdev/3c7ab63a8fdb78cef332 to your computer and use it in GitHub Desktop.

Select an option

Save copyleftdev/3c7ab63a8fdb78cef332 to your computer and use it in GitHub Desktop.
C# des json
public void LoadJson()
{
using (StreamReader r = new StreamReader("file.json"))
{
string json = r.ReadToEnd();
List<Item> items = JsonConvert.DeserializeObject<List<Item>>(json);
}
}
public class Item
{
public int millis;
public string stamp;
public DateTime datetime;
public string light;
public float temp;
public float vcc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment