Json deserializing issue c# -


I want to try deserializing the following Facebook post response:

  "Data ":", ":" Id ":" ... "," to ": {" category ":" local business "," name ":" ... "," id ":" ... "}," Message ":" ... "," picture ":" ... "," likes ": {" data ": [{" id ":" ... "," name ":" ... "} Post Model class is: {"id": "...", "name": "..."]}}]  

  Get public class post {public string ID}; Set; } From the public {get; Set; } Public string message {get; Set; } Public string picture {get; Set; } [Jasonproporty ("likes.data")]  

Like a model class

  like the public class {public string id {get; Set; } Public string name {get; Set; }}  

When deserializing json, I want to map to the likes.data entries in the Favorites list. How can you do this

You can use json for deserializing.

  Newtonsoft.Json.JsonConvert.DeserializeObject ("{\" Data \ ": [...]")  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -