How to json parsing in windows phone ,,
thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Chintan RathodPosted Mar 5, 2013, 12:21 PM
private void ParseJson()
{
var jsonString =
"{\"responseData\": {\"translatedText\":\"??? ???\"}, \"responseDetails\": null,\"responseStatus\": 200}";
RootObject jsonObject = JsonConvert.DeserializeObject
MessageBox.Show(jsonObject.responseData.translatedText);
}
//This class was generated with json2csharp
public class ResponseData
{
public string translatedText { get; set; }
}
//This class was generated with json2csharp
public class RootObject
{
public ResponseData responseData { get; set; }
public object responseDetails { get; set; }
public int responseStatus { get; set; }
}
Following links may help you to learn.
1) http://msdn.microsoft.com/en-us/library/ie/cc836466%28v=vs.94%29.aspx
2) http://upadhyayjitesh.blogspot.in/2012/12/windows-phone-json-parsing-example-part.html
3) http://nkishorchandra.blogspot.in/2012/10/parsing-json-in-windows-phone.html