In: Computer Science
In this assignment, you will create a well-formed JSON object which encapsulates the information specified.
Alignment
This assignment aligns with the following objectives:
Details
Imagine that using the API provided by a service like Yelp (let's call it YelpYou) you have extracted information about Sichuan Dragon, which has three branches (restaurants) in New York City. The YelpYou API will return the information in the form of a JSON object. Your assignment is to write the JSON object that YelpYou API might possibly return. Imagine that this JSON object (and JSON objects for other restaurants in NYC) is consumed by a program that strips the information from the JSON objects and feeds it to an analytical pipeline.
The information given is that Sichuan Dragon cuisine is Chinese, region Sichuan. Its cost level is '$$', decor is casual, noise level is average, it doesn't have Wi-Fi, it takes Visa, MasterCard, and Discover credit cards. For each branch of Sichuan Dragon, it gives the address of each of branch, its phone number, its web-site URL, and its customer rating. It also includes for each restaurant the first sentence of three reviews with a link to 'more' of the review. For example, "Loved their pot stickers" followed by a link to the rest of the review. (Please make up this information.) You must structure your information such that information about each branch is in a JSON object, embedded in the JSON object for Sichuan Dragon.
Assessment
Total 5 points
Sichuan_dragon = {
"cuisine" : "Chinese",
" region" : "Sichuan" ,
"cost_level" : "$$" ,
"noise_level" : "average" ,
" wifi_availability" : "not available" ,
"payment_via" : [ "Visa" "Master card", "Discover credit cards" ] ,
"branches" :3 ,
"branch1" : {
"address" : {Some random restaurant address} ,
" contact_num" : {A random phone number} ,
"url" : {Random website address} ,
" cust_rating" : {A number between 0 and the maximum} ,
" reviews" : {
"1" : "First sentence of review 1...." ,
"view_rev1" : {the link} ,
"2" : "First sentence of review 2....." ,
"view_rev2" : {the link} ,
"3" : "First sentence of review 3....." ,
"view_rev3" : {the link} } ,
"branch2" : {
"address" : {Some random restaurant address} ,
" contact_num" : {A random phone number} ,
"url" : {Random website address} ,
" cust_rating" : {A number between 0 and the maximum} ,
" reviews" : {
"1" : "First sentence of review 1...." ,
"view_rev1" : {the link} ,
"2" : "First sentence of review 2....." ,
"view_rev2" : {the link} ,
"3" : "First sentence of review 3....." ,
"view_rev3" : {the link} } ,
"branch3" : {
"address" : {Some random restaurant address} ,
" contact_num" : {A random phone number} ,
"url" : {Random website address} ,
" cust_rating" : {A number between 0 and the maximum} ,
" reviews" : {
"1" : "First sentence of review 1...." ,
"view_rev1" : {the link} ,
"2" : "First sentence of review 2....." ,
"view_rev2" : {the link} ,
"3" : "First sentence of review 3....." ,
"view_rev3" : {the link} }
}
{ Please replace the words given inside the {...} to the values you prefer. Also, you can change the first sentence of all the reviews }