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 trial

Android Build a Blog Reader Android App Getting Data from the Web Parsing Data Returned in JSON Format

Furkan Demirkan
Furkan Demirkan
7,926 Points

jsonResponse on Android Studio! Help !

Im using android Studio rather than Eclipse, but I ran into a problem. In the video, Eclipse is being used, and I cant get the String JSON the same way as shown in this video...

Ratik Sharma
Ratik Sharma
32,885 Points

Hi! Please provide some code and I'll help you out!

Furkan Demirkan
Furkan Demirkan
7,926 Points

JSONObject jsonResponse = new JSONObject();

In Eclipse, you are able to choose the String parameter by pressing ctrl space, but in Studio, it doesnt show anything to create a new json object

Kate Hoferkamp
Kate Hoferkamp
5,205 Points

You can just type it manually.

1 Answer

In android studio there is only 1 option to select from, so select that :)

Furkan Demirkan
Furkan Demirkan
7,926 Points

Im not sure I understand, In the video, a string json sign appeared above jsonResponse, but Im not sure how to do that in Studio

That doesn't appear in Android studio. Instead it gives JSONObject(org.json) and that is the right one to use. It does not appear like it does in Eclipse. I used that and it worked the same way.

Furkan Demirkan
Furkan Demirkan
7,926 Points

Im about to try it out, but thanks in advance :)

Furkan Demirkan
Furkan Demirkan
7,926 Points

Im about to try it out, but thanks in advance :)

You are welcome :)