I'm very new to json in c#. I'm supposed to make a project and provide my data to other fellow students by a mvc4 api. As a result I should be able to use others api too.
As I don't really have a clue how to parse the result of a request to an object, I'm asking here.
I have been requesting the page like this:
string url = "myUrl";
WebRequest request = HttpWebRequest.Create(url);
WebResponse response = request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string urlText = reader.ReadToEnd();
the result of this request is as follows:
[{"Id":1,"Whose":1,"ReservedUserId":null,"ReservedBy":null,"ReservedSince":null,"City":"Gent","Street":"Sleepstraat","Number":12,"PostalCode":9000,"DateAdded":"2012-12-28T00:00:00","Description":"Momenteel geen omschrijving van dit pand","ContractLength":"12 maand","Surface":12,"MonthPrice":350,"AvailableSince":"2012-12-28T00:00:00","Rooms":2,"Maintenance":"Goed","Equipment":"Niet gemeubeld","Smokers":false,"Animals":false,"Housemates":2,"Toilet":"Gedeeld","Kitchen":"Gedeeld","Shower":"Gedeeld","Internet":"Ja, Telenet","Included":"Gas & Elektriciteit","Guarantee":350,"ContactEmail":"[email protected]","ContactTel":"0936001234"}]
How can I easaly convert this to a c# object so I can use it's properties?
Kind regards