Why there's no quote in the response Json
macctown opened this issue · 2 comments
I call the api correctly and get Json response, but I found there're no quotes on key. And the quotes missing caused problem on parsing Json by jquery method.
Here's the Json I got:
{ region: { span: { latitude_delta: 0.08976654461851297, longitude_delta: 0.17568019027453374 }, center: { latitude: 42.38366727230925, longitude: -71.16492890486273 } }, total: 2757, businesses: [ { is_claimed: true, rating: 4.5, mobile_url: 'http://m.yelp.com/biz/my-other-kitchen-belmont?utm_campaign=yelp_api&utm_medium=api_v2_search&utm_source=v4hjI53TEiOPzQxkazpR6A', rating_img_url: 'http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png', review_count: 112, name: 'My Other Kitchen', rating_img_url_small: 'http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png', url: 'http://www.yelp.com/biz/my-other-kitchen-belmont?utm_campaign=yelp_api&utm_medium=api_v2_search&utm_source=v4hjI53TEiOPzQxkazpR6A', categories: [Object], phone: '6179321444', snippet_text: 'Love the food there.. George is a great and hard working chef that makes food that\'s worthy of coming back for. A very friendly staff helps to keep things...', image_url: 'http://s3-media1.fl.yelpcdn.com/bphoto/DPEu-Nywpah0FxCoJVjQ2A/ms.jpg', snippet_image_url: 'http://s3-media2.fl.yelpcdn.com/photo/tdSuvbv_8HPm1YS99c2fxQ/ms.jpg', display_phone: '+1-617-932-1444', rating_img_url_large: 'http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png', id: 'my-other-kitchen-belmont', is_closed: false, location: [Object] }, { is_claimed: true, rating: 4.5, mobile_url: 'http://m.yelp.com/biz/phinix-grill-belmont?utm_campaign=yelp_api&utm_medium=api_v2_search&utm_source=v4hjI53TEiOPzQxkazpR6A', rating_img_url: 'http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png', review_count: 35, name: 'Phinix Grill', rating_img_url_small: 'http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png', url: 'http://www.yelp.com/biz/phinix-grill-belmont?utm_campaign=yelp_api&utm_medium=api_v2_search&utm_source=v4hjI53TEiOPzQxkazpR6A', categories: [Object], phone: '6174841232', snippet_text: 'This place is terrific!!! After moving to the United States from one of the Turkic countries, my stomach begged for food that would immedeately teleport me...', image_url: 'http://s3-media4.fl.yelpcdn.com/bphoto/X7q063D81gbDcYbZr80hiQ/ms.jpg', snippet_image_url: 'http://s3-media2.fl.yelpcdn.com/photo/r9XAtXJOEGPOAYrscjL3gg/ms.jpg', display_phone: '+1-617-484-1232', rating_img_url_large: 'http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png', id: 'phinix-grill-belmont', is_closed: false, location: [Object] }, { is_claimed: true, rating: 4.5, mobile_url: 'http://m.yelp.com/biz/daves-fresh-pasta-somerville?utm_campaign=yelp_api&utm_medium=api_v2_search&utm_source=v4hjI53TEiOPzQxkazpR6A', rating_img_url: 'http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png', review_count: 610, name: 'Dave\'s Fresh Pasta', rating_img_url_small: 'http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png', url: 'http://www.yelp.com/biz/daves-fresh-pasta-somerville?utm_campaign=yelp_api&utm_medium=api_v2_search&utm_source=v4hjI53TEiOPzQxkazpR6A', categories: [Object], menu_date_updated: 1441940381, phone: '6176230867', snippet_text: 'Take a class here, it will be the best class you ever take. \n\nAs a Christmas present to each other, my roommate and I signed up for the pasta-making class....', image_url: 'http://s3-media4.fl.yelpcdn.com/bphoto/W0iOhtpM3Ax664EHtHfbYQ/ms.jpg', snippet_image_url: 'http://s3-media2.fl.yelpcdn.com/photo/sTQhiq9pDjLw1XnaqgmOtQ/ms.jpg', display_phone: '+1-617-623-0867', rating_img_url_large: 'http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png', menu_provider: 'single_platform', id: 'daves-fresh-pasta-somerville', is_closed: false, location: [Object] } ] }
Another problem is all of the object result are not able to recognized.
Thank you very much for your time and help!
The response is already parsed, all the methods return plain javascript objects.
I got it! Thx!