Created
November 24, 2015 20:39
-
-
Save copyleftdev/3c7ab63a8fdb78cef332 to your computer and use it in GitHub Desktop.
C# des json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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