Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDylan Cairns
11,191 Pointshow to parse json argument in flask
For the challenge task it asks to create a function named from_json with an argument and parse that argument with json.
I have no clue how to do this... can't figure it out based on the video
import json
from flask import request
def from_json(arg):
data = request.args
return data
1 Answer
Iain Simmons
Treehouse Moderator 32,305 PointsYou'll want to look at the Python documentation for the json module, in particular the part about decoding/loading.
See how you go with that, otherwise check back here if you can't find what you need.
Oh and by the way, you won't actually need flask or the request module for this challenge.