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":"MLB1 2871","off icial_stor e_id":null ,"price":1 1,"base_pr ice":11,"c urrency_id ":"BRL","i nitial_qua ntity":10, "available _quantity" :10,"sold_ quantity": 0,"buying_ mode":"buy _it_now"," listing_ty pe_id":"br onze","sta rt_time":" 2014-04-01 T00:17:03. 091Z","sto p_time":"2 014-05-31T 00:17:03.0 91Z","end_ time":"201 4-05-31T00 :17:03.091 Z","condit ion":"new" ,"permalin k":"http://com.br/MLB-550992919--_JM","thu mbnail":"http://www..com/jm/img?s=STC&v=I&f=proccesing_image_pt.jpg" ,"secure_t humbnail": "https://we.com/jm/img?s=STC&v=I&f=proccesing_image_pt.jpg","pictur es":[{"id" :"MLB60784 01592_0320 14","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":"500 x500","max _size":"50 0x500","qu ality":""} ]"date_cre ated":"201 4-04-01T00 :17:03.310 Z","last_u pdated":"2 014-04-01T 00:17:03.3 10Z"}
so, how can i get those variables values from this mess above, what can i use it.
this is an string:
{"id":"MLB550992919","site
so, how can i get those variables values from this mess above, what can i use it.
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
ASKER
i am trying but not having success, can you give me sample using my string and return site_id result
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW, your json string was missing a , just before date_created!
ASKER
thanks
http://msdn.microsoft.com/en-us/library/gg538324%28v=vs.111%29.aspx