I have been working with an API lately that provides data in JSON format, and I know the fields it contains. I am trying to deserialize this data into a list format. I checked out the Newtonsoft.Json namespace for help, but unfortunately, the article I came across didn't quite address my specific issue since I am not familiar with the key/value pairs used. You can find the article here: http://www.newtonsoft.com/json/help/html/deserializeobject.htm
Here is a snippet of my code:
static void GetShares()
{
WebRequest request = WebRequest.Create("https://shares.ppe.datatransfer.microsoft.com/api/v1/data/shares/");
request.Method = "GET";
request.Headers.Add("Authorization","Basic "+
Convert.ToBase64String(
Encoding.ASCII.GetBytes("useridandpassword")));
request.ContentType = "application/json";
WebResponse response = request.GetResponse();
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd();
Console.WriteLine(responseFromServer);
}