Reputation: 15
So I used postman to retrieve API data from a website named Zillow, the problem I am running into now is I don't know how to use that data that received in a c# class. basically how to call my json, read it, and return into my class. For the record i used post for the API call in postman.
API post - http://www.zillow.com/webservice/ProReviews.htm .....
{
"message": {
"code": "0",
"text": "Request successfully processed"
},
"response": {
"results": {
"screenname": "ahaque",
"count": "3",
"proInfo": {
"name": "Azib Haque",
"photo": "https://www.zillowstatic.com/static/images/nophoto_h_g.png",
"profileURL": "http://www.zillow.com/profile/ahaque/",
"profileLink": "Continue reading",
"title": "",
"businessName": "",
"address": "",
"phone": "",
"specialties": "",
"serviceAreas": [],
"reviewRequestURL": "http://www.zillow.com/reviews/write/?s=X1-ZU11wnv9uggyj2h_9r65r",
"reviewCount": "0"
},
"proReviews": {
"review": []
}
}
}
}
Upvotes: 0
Views: 1642
Reputation: 798
You have json data that you need to deserialize, preferably using JSON.Net.
This has been answered many times, and there's even a useful tool that lets you transpile JSON into C# objects.
Upvotes: 2