This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Introduction to Twitter's API Forum

View Course

20 points
Picture
Submitted by
Tara Bull
about 3 years ago

Parsing a User Object help

"You can call JSON.parse to decode a JSON-encoded string. This method returns a decoded object."

I don't understand where to do this?


4 votes

permalink

At line #3 type:
require 'json'

Then at line #13 type:
user = JSON.parse(response.body)

283 points
518f0111fe11db033a923b978b3205e4?s=140&d=retro
Submitted by
gelovic
about 3 years ago

1 Comment

55a3c6ac76b8fe52e5000376_24788943 Fekete Eduard almost 3 years ago

Thats exactly what i was doing, but it does not work.


0 votes

permalink

below these comments

# Parse the response body, which is in JSON format.
# ADD CODE TO PARSE THE RESPONSE BODY HERE

55 points
Picture
Submitted by
Lucas Affonso
about 3 years ago


0 votes

permalink

I forgot #3. it's working now. Thank you.

121 points
Cc73b041ef37fb377e8d541442263f14?s=140&d=retro
Submitted by
Raul Tiru
over 2 years ago