Module 05 ยท HTTP & Flask โ Lesson 3 of 4 ยท ~8 min
Routes that return JSON
A dict is already almost JSON
Module 15 planted this flag: a JSON object is a dict. Flask cashes that in directly โ return a dict from a route function, and Flask turns it into a proper JSON HTTP response for you, Content-Type header included.
Let's serve the same shape the real backend's GET /walkers returns โ you can compare them side by side at http://localhost:8000/docs once the real backend is running.