- {
- "version": "1.0",
- "encoding": "UTF-8",
- "feed": {
- "xmlns": "http://www.w3.org/2005/Atom",
- "xmlns$openSearch": "http://a9.com/-/spec/opensearchrss/1.0/",
- "xmlns$gsx": "http://schemas.google.com/spreadsheets/2006/extended",
- "id": {
- "$t": "xxx"
- },
- "updated": {
- "$t": "2018-02-18T02:47:36.549Z"
- },
- "category": [
- {
- "scheme": "http://schemas.google.com/spreadsheets/2006",
- "term": "http://schemas.google.com/spreadsheets/2006#list"
- }
- ],
- "title": {
- "type": "text",
- "$t": "Sheet1"
- },
- "link": [
- {
- "rel": "alternate",
- "type": "application/atom+xml",
- "href": "xxx"
- },
- {
- "rel": "http://schemas.google.com/g/2005#feed",
- "type": "application/atom+xml",
- "href": "xxxx"
- },
- {
- "rel": "http://schemas.google.com/g/2005#post",
- "type": "application/atom+xml",
- "href": "xxx"
- },
- {
- "rel": "self",
- "type": "application/atom+xml",
- "href": "xxx"
- }
- ],
- "author": [
- {
- "name": {
- "$t": "xx"
- },
- "email": {
- "$t": "xx@gmail.com"
- }
- }
- ],
- "openSearch$totalResults": {
- "$t": "1"
- },
- "openSearch$startIndex": {
- "$t": "1"
- },
- "entry": [
- {
- "id": {
- "$t": "xxx"
- },
- "updated": {
- "$t": "2018-02-18T02:47:36.549Z"
- },
- "category": [
- {
- "scheme": "http://schemas.google.com/spreadsheets/2006",
- "term": "http://schemas.google.com/spreadsheets/2006#list"
- }
- ],
- "title": {
- "type": "text",
- "$t": "kBYuDEwqT69nXfHV7qqZPg==\n"
- },
- "content": {
- "type": "text",
- "$t": ""
- },
- "link": [
- {
- "rel": "self",Q
- "type": "application/atom+xml",
- "href": "xxx"
- }
- ],
- "gsx$name": {
- "$t": "kBYuDEwqT69nXfHV7qqZPg==\n"
- }
- }
- ]
- }
- }
複製代碼- JSONObject jsonObject = getJSONObjectFromURL(urlString);
- String s = jsonObject.toString();
- serverMessage.setText(s);
-
- //JSONArray params = jsonObject.getJSONArray("entry");
- //JSONObject param1 = params.getJSONObject(0);
-
- //Object param1 = jsonObject.get("feed");
- String s2 = jsonObject.getString("feed.entry");
-
-
- //String s2 = param1.toString();
- googleText.setText(s2);
複製代碼 Always throws exceptions....!!!
PLS HELP
THX |