Reputation: 39
I learned in a blog reader tutorial to grap the json file and put on the code. How can I take it from a wordpress blog?
for example: http://blog.teamtreehouse.com/api/get_recent_summary/?count=20
Thanks!
Upvotes: 0
Views: 148
Reputation: 6554
Well, i am guessing your final goal is to parse the json data after you get it from the website. Right? If that's the case, you can go about it in two ways -
You can directly access the URL in android application using HTTP post method giving count parameter and value 20 and get the response and decode it using JSON parser
If you want to do it offline i.e not connect your android device to internet, then you can simply save the data into a file and place the file in your assets folder of your application and then open the file and read it and parse it. On Chrome web-browser, you can use REST client that makes it a bit convenient to store the json data into a file.
Now, depending on which way you want to go, you will have to investigate that route to get more implementation details on the same.
HTH.
posts: [20]
0: {
id: 22313
url: "http://blog.teamtreehouse.com/best-free-jquery-form-plugins-to-improve-user-experience"
title: "Best Free jQuery Form Plugins to Improve User Experience"
date: "2013-09-26 10:07:23"
author: "Jake Rocheleau"
thumbnail: "http://blog.teamtreehouse.com/wp-content/uploads/2013/09/autotab-jquery-plugin-preview-150x150.jpg"
}
Upvotes: 1