Good afternoon how do I get the data from a url that is in json format and play inside my textbox? Thank you
Good afternoon how do I get the data from a url that is in json format and play inside my textbox? Thank you
good Fernando
use the JavaScriptSerializer class to decerialize Json. try this:
//GetResultViewModel é a class onde fica encapsulado os atributos do teu json
GetResultViewModel obj = new GetResultViewModel();
JavaScriptSerializer jss= new JavaScriptSerializer();
obj = jss.Deserialize<GetResultViewModel>(teujson);
the link is this link
and as a result:
[ { "id": "bitcoin", "name": "Bitcoin", "symbol": "BTC", "rank": "1", "price_usd": "2398.7", "price_btc": "1.0", "24h_volume_usd": "1539760000.0", "market_cap_usd": "39216435052.0", "available_supply": "16349037.0", "total_supply": "16349037.0", "percent_change_1h": "-1.22", "percent_change_24h": "4.64", "percent_change_7d": "31.37", "last_updated": "1495643052" } ]