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

Android: Blogreader>

I have read questions available on treehouse forum but I am still confused. Is it possible to read app's data from server using JSON? App data is available from server in HTML form. How to convert this html webpage into JSON? Where to store core.php for my android app(I mean in which folder). I'm not using wordpress/cms for blog/data. Thanks for your help!

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

The app can get the data in whatever format it's available. But if it's not JSON, then it needs to be handled differently in the app. Parsing HTML is difficult because it has a lot of extra information about how the web page will look.

To convert to JSON, you need to create or use some kind of service that makes the important data available in the JSON format. WordPress, for example, has a JSON API plugin that does this automatically, which is what we use in the project. It just depends on your site. You might be able to find a plugin or something else you can use, or you might have to write your own (which is obviously more difficult).

What core.php file are you talking about? Do you have a link? Is that the page you want to download into the app?