Essential Question: How do you use JSON in python?
Mastery Objectives:
SWBAT use the module JSON in python.
SWBAT learn how to import data into their projects from a website.
Do Now: Type the following code and add your birthday and two of your family member's birthdays:
JSON: JSON stands for JavaScript object notation. It is a scripting language that is used to collect data from web pages. In order to use it in python, you need to convert it to python. Here is an example:
Here is how to convert it to JSON:
Let's look at the next one. What is this? Are we converting from JSON to Python or Python to JSON?
Directions: Use the starter project and follow the directions for the project: "Where is the Space Station?" https://projects.raspberrypi.org/en/projects/where-is-the-space-station/0Â
Ticket-to-Leave: In the comments below, how else could you use JSON?