Use your favorite search engine and the provided readings to research and respond to the following questions.
In your responses, be sure to cite any relevant sources you consulted in your search. We ask you to write responses in your own words in order to see how you process what you've read. Please do not respond with direct quotes from source material. Instead, digest what you've read and repeat it in your own voice.
JavaScript Object Notation (JSON) is a way to represent data. It is typically used to communicate data between an application programming interface (API) and a client. JSON is a string with a very specific format and it is formally defined at http://www.json.org.
A great way to become familiar with the format is to look at some examples.
JSON is:
- a data exchange format.
- a way to represent data.
- a string with a specific format.
JSON is not:
- a dictionary.
- an object.
- an object literal.
JSON does not support:
- comments.
- methods.
Attempts to treat JSON as if it were a JavaScript object literal or as anything other than a string is a common source of errors that can be difficult to find and debug.
Remember, data represented with JSON looks like an object, but it is only a string.
Write a JSON representation of the following data that makes sense to you.
A kitchen has many items.
- A cupboard containing bowls and plates.
- An electric stove with four heating elements; small, medium, large, and extra large.
- An herbs and spices rack containing chives, lemon grass, and mint on one rack, and cinnamon, nutmeg, and vanilla on another shelf.
<!-- your answer here -->
The kitchen also has a fruit basket containing several cultivars of apples in different amounts. There are 2 Fuji apples, 7 Gala apples, and 1 Golden delicious apple.
Copy the JSON that you wrote for the previous question and include the new information about the kitchen.
<!-- your answer here -->
Can you write a method in the JSON that you wrote above?
<!-- your answer here -->
Can you write comments in the JSON that you wrote above?
<!-- your answer here -->