Link to home
Start Free TrialLog in
Avatar of rafaelrgl
rafaelrgl

asked on

how to read an json format text

hi, i am new to this, so i am using an api and the result of some function is this below:

this is an string:

{"id":"MLB550992919","site_id":"uuuu","title":"Produto Teste - Testando ","subtitle":"Subtitulo Do Produvo Vai Aqui","seller_id":11921150,"category_id":"MLB12871","official_store_id":null,"price":11,"base_price":11,"currency_id":"BRL","initial_quantity":10,"available_quantity":10,"sold_quantity":0,"buying_mode":"buy_it_now","listing_type_id":"bronze","start_time":"2014-04-01T00:17:03.091Z","stop_time":"2014-05-31T00:17:03.091Z","end_time":"2014-05-31T00:17:03.091Z","condition":"new","permalink":"http://com.br/MLB-550992919--_JM","thumbnail":"http://www..com/jm/img?s=STC&v=I&f=proccesing_image_pt.jpg","secure_thumbnail":"https://we.com/jm/img?s=STC&v=I&f=proccesing_image_pt.jpg","pictures":[{"id":"MLB6078401592_032014","url":"http://www.om/jm/img?s=STC&v=O&f=proccesing_image_pt.jpg","secure_url":"https://wwcom/jm/img?s=STC&v=O&f=proccesing_image_pt.jpg","size":"500x500","max_size":"500x500","quality":""}]"date_created":"2014-04-01T00:17:03.310Z","last_updated":"2014-04-01T00:17:03.310Z"}

so, how can i get those variables values from this mess above, what can i use it.
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

this might help, using the framework function Json.Decode:
http://msdn.microsoft.com/en-us/library/gg538324%28v=vs.111%29.aspx
You need to create a class and use the appropriate component. I have published an article on it. Check http://emoreau.com/Entries/Articles/2014/01/Using-JsonNet.aspx
Avatar of rafaelrgl
rafaelrgl

ASKER

i am trying but not having success, can you give me sample using my string and return site_id result
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BTW, your json string was missing a , just before date_created!
thanks