REST and JSON
Representation State Transfer (REST) is a widely-used architectural style for web services that decouples the presentation of the data from the application programming interface (API) used to access that data. REST uses standard HTTP methods (e.g., GET and POST requests) to access and to modify resources. Many REST services use JavaScript Object Notation (JSON) to exchange data, as JSON is a lightweight data serialization format that is both human and machine readable.
Learning Objectives
- Create JSON representations of data (particularly arrays and objects)
- Compare and contrast JSON and XML as data formats
- Describe the benefits of REST as an architectural style
- Use and implement a simple REST service
How to Complete this Lesson
Complete the following learning activities: (3–3.25 hours total)
- Continue work on the project website
(90 minutes)
- Complete the implementation of the initial web page
- Start implementing additional pages
- Complete the following parts of W3Schools’s JSON Tutorial: (10–20 minutes)
- Read Understanding and Using REST APIs (10–20 minutes)
- Attend the class meeting
(60 minutes)
- Complete the REST API exercises (15–30 minutes)
- Take the quiz (10 minutes)
Due
As a reminder, the following are due this lesson:
Resources
- REST API concepts and examples (9 minutes)