How can I translate the information from the web source to Json? Registered as json on the web..
According to the values I want to show in the table information
I apologize for the language I use translation
MyCode :
var httpWebRequest = (HttpWebRequest)WebRequest.Create("link");
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "GET";
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var result = streamReader.ReadLine();
Airport kny = JsonConvert.DeserializeObject<Airport>(result);
string fskodu = kny.fsCode; // fs kodu null whyy???
}
public class Airport
{
[JsonProperty("requestedCode")]
public string requestedCode { get; set; }
[JsonProperty("fsCode")]
public string fsCode { get; set; }
}