I want to parse the results of a public google reader feed of mine. I am writing an app in gwt and up to this point I had been following an example with the line:
String gdata =
"http://www.google.com/base/feeds/snippets?alt=json-in-script&callback=";
The feed is retrieved,
public void handle(JavaScriptObject jso) {
JSONObject json = new JSONObject(jso);
JSONArray ary = json.get("feed").isObject().get("entry").isArray();
Window.alert(json.toString());
}
and the data is displayed on the panel + i see it in the alert window. However, when I change the url so that I can use my feed rather than an example, nothing works.
Here are some of the ways I've tried to format my url:
http://www.google.com/reader/public/javascript/feed/http://www.google.com/reader/public/atom/user%2F17524205173321155204%2Flabel%2Fpub?alt=json-in-script&callback=
http://www.google.com/reader/public/javascript/feed/http://www.google.com/reader/public/atom/user%2F11035509885961399965%2Fstate%2Fcom.google%2Fbroadcast?callback=?
http://www.google.com/reader/public/javascript/feed/http://www.google.com/reader/public/atom/user%2F11035509885961399965%2Fstate%2Fcom.google%2Fbroadcast?callback=?
Ostensibly the feeds are the same except for the example one that works has all the text on a single long line where the others have whitespace. Could this be causing an issue? What can I do to get around it?
I want to run regular expressions against the data im getting back from the feed. is there a better way to do this?
Thank you very much!