0

How can i parse the following Json using DataContractJsonSerializer

{"Jack":{"accountId":407,"accountType":"TWITTER"}, "Mark":{"accountId":407,"accountType":"TWITTER"}, "John":{"accountId":407,"accountType":"TWITTER"}, "407":{"accountId":407,"accountType":"TWITTER"}

}

2 Answers 2

2

Firstly you need to implement a class that represents this JSON data. Then you need to create an instance of the DataContractJsonSerializer, and then call the ReadObject method to perform the deserialization.

Although this post refers to .NET 3.5, I think it should still help you out on WP7.

Sign up to request clarification or add additional context in comments.

Comments

0

I also had a similar kind of an problem. I used nested Dictionaries. Something like this -

Dictionary<string, Dictionary<string, object>>

Then I looped through the deserialised object to get the values.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.