Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about deserializing #112

Open
beraybentesen opened this issue Jun 5, 2017 · 6 comments
Open

Question about deserializing #112

beraybentesen opened this issue Jun 5, 2017 · 6 comments
Labels

Comments

@beraybentesen
Copy link

Hi,

I'm trying to parse json response like this but nothing happens. Any suggestion ?

screen shot 2017-06-06 at 1 51 09 am

Thanks

@jarsen jarsen added the question label Jun 6, 2017
@ttuygun
Copy link

ttuygun commented Jul 5, 2017

Hmm. It supposed to parse it. Can you send the example JSON?

@beraybentesen
Copy link
Author

@ttuygun Example response for 1 item :

{
"PropertiesResponse": {
"Properties": [
{
"id": 2289,
"is_passive": 0,
"lead_id": null,
"agent_id": 3302,
"contact_first_name": “Name”,
"contact_last_name": “LastName”,
"is_office_page_property": 1,
"user_listing_url_type": 1,
"is_shareable": 1,
"category_id": 1,
"status": 2,
"type": 1,
"price": 5700000,
"price_currency": 1,
"ad_type": 1,
"latitude": 10.000000000,
"longitude": 100000000000,
"area": 245,
"room": 4,
"saloon_count": 1,
"age": 0,
"floor": 14,
"total_floor": 15,
"district_id": 1111111111,
"source_property_id": 1111111111,
"url": “url”,
"title": “Title”,
"description": “Description”,
"User": {
"id": 3302,
"folder_path": “folder_path”,
"file_name": “file_name.jpg"
},
"County": {
"name": "Kadıköy"
},
"District": {
"name": "Fenerbahçe Mah."
},
"Lead": {
"is_passive": null
},
"PropertyImage": {
"folder_path": “folder_path”,
"file_name": “file_name.jpg"
},
"ReferenceProperty": {
"reference_property_id": null
},
"Prices": {
"price": {
"dollar": {
"symbol": "$",
"price": 1600718
},
"euro": {
"symbol": "€",
"price": 1409530
},
"pound": {
"symbol": "£",
"price": 1235156
},
"turkish_lira": {
"symbol": "TL",
"price": 5700000
}
},
"m2Price": {
"dollar": {
"symbol": "$",
"price": 6533
},
"euro": {
"symbol": "€",
"price": 5753
},
"pound": {
"symbol": "£",
"price": 5041
},
"turkish_lira": {
"symbol": "TL",
"price": 23265
}
}
},
"PropertyStats": {
"similarLeads": 0,
"similarProperties": 0,
"similarOfficeProperties": 0,
"eligibleCustomers": 0,
"totalSimilarListings": 0
},
"Options": {
"type": "Daire ",
"price_currency": "Türk Lirası ",
"age": "Sıfır ",
"floor": "14 ",
"total_floor": "15 ",
"status": “Status”,
"ad_type": “ad_type”
}
}
],
"Pagination": {
"page": 1,
"count": 38,
"pageCount": 38
},
"Return": {
"Status": "OK",
"UserId": 3302,
"OfficeId": 84,
"Message": "Properties Found"
}
}
}

@ttuygun
Copy link

ttuygun commented Jul 5, 2017

Can you also upload parser models?

@beraybentesen
Copy link
Author

I don't have any code unfortunately. I just followed guide for a few key not for all key in response. No exception, no error nothing happened.

@ttuygun
Copy link

ttuygun commented Jul 6, 2017

Your quotes is not correct in the response of the JSON. Is this issue because of sever or your copy paste mistake? Could you test your JSON in any JSON validation site?

@beraybentesen
Copy link
Author

It was my mistake. Here is the correct one, thank you.

{
"PropertiesResponse": {
"Properties": [
{
"id": 2289,
"is_passive": 0,
"lead_id": null,
"agent_id": 3302,
"contact_first_name": "name",
"contact_last_name": "last_name",
"is_office_page_property": 1,
"user_listing_url_type": 1,
"is_shareable": 1,
"category_id": 1,
"status": 2,
"type": 1,
"price": 5700000,
"price_currency": 1,
"ad_type": 1,
"latitude": 40.971476352484849,
"longitude": 29.046548008918759,
"area": 245,
"room": 4,
"saloon_count": 1,
"age": 0,
"floor": 14,
"total_floor": 15,
"district_id": 13402005007,
"source_property_id": 376277648,
"url": "url",
"title": "Title",
"description": "Desc...",
"User": {
"id": 3302,
"folder_path": "path",
"file_name": "5942c2368d4f7.jpg"
},
"County": {
"name": "Kadıköy"
},
"District": {
"name": "Fenerbahçe Mah."
},
"Lead": {
"is_passive": null
},
"PropertyImage": {
"folder_path": "path",
"file_name": "sah_593fe53daf625.jpg"
},
"ReferenceProperty": {
"reference_property_id": null
},
"Prices": {
"price": {
"dollar": {
"symbol": "$",
"price": 1587434
},
"euro": {
"symbol": "€",
"price": 1399769
},
"pound": {
"symbol": "£",
"price": 1227125
},
"turkish_lira": {
"symbol": "TL",
"price": 5700000
}
},
"m2Price": {
"dollar": {
"symbol": "$",
"price": 6479
},
"euro": {
"symbol": "€",
"price": 5713
},
"pound": {
"symbol": "£",
"price": 5008
},
"turkish_lira": {
"symbol": "TL",
"price": 23265
}
}
},
"PropertyStats": {
"similarLeads": 0,
"similarProperties": 0,
"similarOfficeProperties": 0,
"eligibleCustomers": 0,
"totalSimilarListings": 0
},
"Options": {
"type": "Daire ",
"price_currency": "Türk Lirası ",
"age": "Sıfır ",
"floor": "14 ",
"total_floor": "15 ",
"status": "Satılık ",
"ad_type": "ad"
}
}
],
"Pagination": {
"page": 1,
"count": 38,
"pageCount": 38
},
"Return": {
"Status": "OK",
"UserId": 3302,
"OfficeId": 84,
"Message": "Properties Found"
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants