get json data in url and play inside a textbox in c #

0

Good afternoon how do I get the data from a url that is in json format and play inside my textbox? Thank you

    
asked by anonymous 16.05.2017 / 17:20

2 answers

0

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);
    
17.05.2017 / 09:32
0

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"     } ]

    
24.05.2017 / 18:29