„Funktions/Json_Parse_Example.cs“ ändern

This commit is contained in:
Marcus Ferl 2022-04-01 21:26:06 +02:00
parent f1e63c40f2
commit d2a91553b8

View File

@ -13,8 +13,16 @@ class JsonParser
// Get Data
dynamic get_jsonData(string url)
{
string json = "";
var webclient = new WebClient();
string json = webclient.DownloadString(url);
try
{
json = webclient.DownloadString(url);
}
catch(WebException e)
{
throw e;
}
dynamic dynJson = JsonConvert.DeserializeObject(json);
return dynJson;