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

David Bouchare
David Bouchare
9,224 Points

Blog Reader - from another blog

Hi everyone, I would like to code a Blog Reader for Android based on Data taken from another blog (a Wordpress one). Problem is that there is no JSON data to parse as each blog has a title and not a unique ID like the Treehouse one (no API it seems). Is there a workaround? Is it still possible to display each blog post on a list? Thanks a lot!

3 Answers

I think you have to transform the data in your WP database with a PHP function

json_encode
Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Do you have access to the blog? If so, you can install the same plugin we use for ours that outputs the JSON feed, like this: https://teamtreehouse.com/forum/converting-blog-post-to-json

Otherwise, you need to see what kinds of feeds are available and change the app to parse those instead. If only XML is available, for example, then instead of parsing the JSON data you could use something like XmlPullParser.

If you want us to take a look at the blog just drop the URL in a reply. :)

David Bouchare
David Bouchare
9,224 Points

Hi Ben,

No I don't unfortunately but thanks for the tip. I'll see what I can do.

Best,

David