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

Asked

Viewed 104 times

0

Good afternoon how do I take the data of a url that is in json format and play inside my textbox ? thank you

2 answers

0

the link is this https://api.coinmarketcap.com/v1/ticker/bitcoin/

and as a result of this:

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

0

boa Fernando

use the Javascriptserializer class to downgrade Json. try like 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);
  • obg but has some example ?

  • put the structure of your json so I can help you decentralize

  • hello I sent her

Browser other questions tagged

You are not signed in. Login or sign up in order to post.