Last post Apr 08, 2016 02:37 AM by Yohann Lu
Apr 07, 2016 05:53 PM|mandrews1234|LINK
what am I doing wrong here? i'm trying to consume the ncaa data but I'm getting a bunch of \t and \n in my data, which makes it so I can't serialize it to an object. Here is my function, you can literally run this as it takes no credentials to get the data.
public string GetGameInfo(DateTime dt)
string content = string.Empty;
string url = "http://data.ncaa.com/jsonp/scoreboard/baseball/d1/2016/04/06/scoreboard.html";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/json";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream resStream = response.GetResponseStream();
using (StreamReader sr = new StreamReader(resStream))
content = sr.ReadToEnd();
Apr 08, 2016 02:37 AM|Yohann Lu|LINK
From your description, I have made a sample on my side. I found the question like you described. I think it is related to the data source format.
I suggest you can sue XmlMediaTypeFormatter to get data. It returns normal data.