How to create a JSON structure using Arraylist and Hashmap - android

I'm a beginner in android development ... i want to know how to create a json structure, with using arraylists and hashmaps ... you can find the structure as follows ...
NOTE: I don't want to use JSONArray or JSONObject
[
[
{
"blog_owner" : "user",
"icalIssueEventID" : "",
"updated_date" : "2014-02-17 07:05:53 +0000",
"icalEventID" : "",
"blog_stage" : "Cancelled",
"blog_ID" : "GMpk20140206160708281",
"created_date" : "2014-02-06 10:37:38 +0000",
"emailFlag" : false
}
],
[
{
"blog_iNotes_ID" : "",
"blog_name" : "",
"blog_status" : "",
"blog_duration" : ""
},
{
"pid" : "0",
"isOpen" : true,
"id" : "R1",
"level" : 0,
"value" : [
{
"level" : 0,
"id" : "MA20140206181038936",
"type" : "meetingAgenda",
"isOpen" : true,
"value" : [
{
"pid" : "MA20140206181038936",
"level" : 1,
"id" : "CN20140207211127374",
"isOpen" : false,
"value" : [
],
"line_number" : 13,
"keyItem" : "Fgh",
"isCategorySelected" : false
},
{
"line_number" : 14,
"level" : 1,
"id" : "CN20140217123343769",
"isOpen" : true,
"value" : [
],
"keyItem" : "Fghh",
"isCategorySelected" : false,
"pid" : "MA20140206181038936"
},
{
"pid" : "MA20140206181038936",
"level" : 1,
"id" : "ISS20140217123542229",
"isOpen" : true,
"type" : "Issues",
"value" : [
],
"type_KeyItem" : {
"tfImpact" : "",
"tvIssueDescription" : "",
"tfActionRequired" : "Ffg",
"tfResponsible" : "",
"targetDate" : "Month DD YYYY"
},
"keyItem" : "Issues",
"isCategorySelected" : true,
"line_number" : 15
}
],
"type_KeyItem" : {
"tfAgendaTitle" : "New agenda for magic minutes",
"lblDuration" : "00:00",
"tfAgendaName" : ""
},
"line_number" : 11,
"isCategorySelected" : false,
"pid" : "R1"
}
],
"isCategorySelected" : false,
"keyItem" : "root",
"line_number" : 10
}
],
[
]
]

You can use google-gson library for converting JSON to Java objects and vice-versa.
Some other helpful links are :
1) http://www.javacreed.com/simple-gson-example/
2) http://www.mkyong.com/java/how-do-convert-java-object-to-from-json-format-gson-api/
Hope this will help you.

Related

JSON Object not showing everything

I'm using Android Volley to fetch JSON objects from an API. I'm going to use this URL as a reference: https://glosbe.com/gapi/translate?from=la&dest=eng&format=json&phrase=puer&pretty=true
Basically, I'm trying to convert between Latin and English using this API. I'm having an issue where, when I fetch the JSON in my app, and display it using toString(), it doesn't show some content that I was able to see if I pulled it up in my browser. Here's what it looked like in my browser:
{
"result" : "ok",
"tuc" : [ {
"phrase" : {
"text" : "boy",
"language" : "en"
},
"meanings" : [ {
"language" : "en",
"text" : "male servant"
}, {
"language" : "en",
"text" : "young male"
}, {
"language" : "en",
"text" : "youth (1)"
} ],
"meaningId" : 5190805061708394514,
"authors" : [ 89651 ]
}, {
"phrase" : {
"text" : "child",
"language" : "en"
},
"meanings" : [ {
"language" : "en",
"text" : "a minor"
} ],
"meaningId" : -7607542873189716522,
"authors" : [ 89651 ]
}, {
"phrase" : {
"text" : "lad",
"language" : "en"
},
"meaningId" : -4906708417289394649,
"authors" : [ 66257 ]
}, {
"phrase" : {
"text" : "young",
"language" : "en"
},
"meanings" : [ {
"language" : "en",
"text" : "in the early part of life or growth"
} ],
"meaningId" : -3502972425310277951,
"authors" : [ 83058 ]
}, {
"phrase" : {
"text" : "laddie",
"language" : "en"
},
"meaningId" : 8881496802632467440,
"authors" : [ 36 ]
}, {
"phrase" : {
"text" : "son",
"language" : "en"
},
"meaningId" : -5777550766434985278,
"authors" : [ 25115 ]
}, {
"phrase" : {
"text" : "teenager",
"language" : "en"
},
"meanings" : [ {
"language" : "en",
"text" : "person aged between thirteen and nineteen"
} ],
"meaningId" : 3903113562290975250,
"authors" : [ 83058 ]
}, {
"phrase" : {
"text" : "young man",
"language" : "en"
},
"meaningId" : 8100655201654223005,
"authors" : [ 1490 ]
}, {
"phrase" : {
"text" : "youth",
"language" : "en"
},
"meanings" : [ {
"language" : "en",
"text" : "youth (1)"
} ],
"meaningId" : 3228296648002997345,
"authors" : [ 92945 ]
}, {
"phrase" : {
"text" : "attendant",
"language" : "en"
},
"meaningId" : -215343938140795468,
"authors" : [ 66257 ]
}, {
"phrase" : {
"text" : "children",
"language" : "en"
},
"meaningId" : -7262823696521965327,
"authors" : [ 66257 ]
}, {
"phrase" : {
"text" : "kid",
"language" : "en"
},
"meaningId" : 667611545945379095,
"authors" : [ 13 ]
}, {
"phrase" : {
"text" : "little son",
"language" : "en"
},
"meaningId" : 7069478616059810263,
"authors" : [ 66257 ]
}, {
"phrase" : {
"text" : "male child",
"language" : "en"
},
"meaningId" : -6364965082259980533,
"authors" : [ 66257 ]
}, {
"phrase" : {
"text" : "servant",
"language" : "en"
},
"meaningId" : 3306664352577272579,
"authors" : [ 66257 ]
}, {
"phrase" : {
"text" : "slave",
"language" : "en"
},
"meaningId" : 3485776351359445593,
"authors" : [ 66257 ]
}, {
"meanings" : [ {
"language" : "en",
"text" : "(in the plural) children"
}, {
"language" : "en",
"text" : "boyhood (ex: <i>in puero</i>, "in his boyhood" or "as a boy")"
}, {
"language" : "en",
"text" : "a child"
}, {
"language" : "en",
"text" : "a boy"
}, {
"language" : "en",
"text" : "a male servant"
}, {
"language" : "en",
"text" : "a bachelor"
}, {
"language" : "en",
"text" : "vocative singular of puer"
} ],
"meaningId" : -1803685626071521178,
"authors" : [ 1 ]
} ],
"phrase" : "puer",
"from" : "la",
"dest" : "en",
"authors" : {
"66257" : {
"U" : "",
"id" : 66257,
"N" : "Charlton T. Lewis",
"url" : "https://glosbe.com/source/66257"
},
"92945" : {
"U" : "",
"id" : 92945,
"N" : "CLLD Concepticon",
"url" : "https://glosbe.com/source/92945"
},
"1" : {
"U" : "http://en.wiktionary.org",
"id" : 1,
"N" : "en.wiktionary.org",
"url" : "https://glosbe.com/source/1"
},
"89651" : {
"U" : "",
"id" : 89651,
"N" : "GlosbeWordalignmentRnD",
"url" : "https://glosbe.com/source/89651"
},
"1490" : {
"U" : "http://www.archives.nd.edu/cgi-bin/words.exe",
"id" : 1490,
"N" : "Piotr Szelma",
"url" : "https://glosbe.com/source/1490"
},
"83058" : {
"U" : "",
"id" : 83058,
"N" : "Dbnary: Wiktionary as Linguistic Linked Open Data",
"url" : "https://glosbe.com/source/83058"
},
"36" : {
"U" : "http://freedict.org",
"id" : 36,
"N" : "freedict.org",
"url" : "https://glosbe.com/source/36"
},
"25115" : {
"U" : "",
"id" : 25115,
"N" : "GlTrav3",
"url" : "https://glosbe.com/source/25115"
},
"13" : {
"U" : "http://ro.wiktionary.org",
"id" : 13,
"N" : "ro.wiktionary.org",
"url" : "https://glosbe.com/source/13"
}
}
}
When I pull it up in my app, it doesn't show the "phrase" portion. Here's the code that I used:
RequestQueue mRequestQueue;
Cache cache = new DiskBasedCache(getActivity().getCacheDir(), 1024 * 1024); // 1MB cap
Network network = new BasicNetwork(new HurlStack());
mRequestQueue = new RequestQueue(cache, network);
mRequestQueue.start();
String url = "https://glosbe.com/gapi/translate?from=la&dest=eng&format=json&phrase=" + e.getText().toString();
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest
(Request.Method.GET, url, null, new Response.Listener<JSONObject>()
{
#Override
public void onResponse(JSONObject response)
{
Log.d("JSON", response.toString());
try
{
JSONArray arr = response.getJSONArray("tuc");
try
{
JSONObject phrase = response.getJSONObject("phrase");
}
catch(JSONException e)
{
Toast.makeText(getActivity(), "Phrase not found", Toast.LENGTH_LONG).show();
}
Log.d("JSON", arr.toString());
try
{
JSONArray arr2 = arr.getJSONObject(0).getJSONArray("meanings");
definition = arr2.getJSONObject(0).getString("text");
t.setText(definition);
Toast.makeText(getActivity(), "Got stuff sucessfully", Toast.LENGTH_LONG).show();
}
catch (JSONException e)
{
JSONObject phrase = arr.getJSONObject(0);
definition = phrase.getString("text");
t.setText(definition);
Toast.makeText(getActivity(), "Got stuff succesfully with exception", Toast.LENGTH_LONG).show();
}
}
catch(JSONException e)
{
Log.d("error", e.toString());
}
}
}, new Response.ErrorListener() {
#Override
public void onErrorResponse(VolleyError error)
{
Log.d("Error", error.toString());
}
});
MySingleton.getInstance(getActivity()).addToRequestQueue(jsonObjectRequest);
The code you're using to parse it doesn't match the structure of the JSON.
"tuc" is an array, "phrase" and "meanings" are inside the objects in that array. Let's say you wanted to get just the first phrase:
JSONArray tuc = response.getJSONArray("tuc");
JSONObject phrase = tuc.getJSONObject(0).getJSONObject("phrase");
I think that's right but I don't have an Android project set up to test it at the moment.
Ok here is the code to parse your response in android:
try
{
JSONArray TUCarray = response.getJSONArray("tuc");
JsonObject phraseobject=TUCarray.getJSONObject(0).getJSONObject("phrase");
}
catch(JSONException e)
{
Toast.makeText(getActivity(), "Phrase not found",Toast.LENGTH_LONG).show();
}
Be careful when you are parsing the whole response because I could see that some objects of TUC array doesnt have sub object phrase eg:- Last object of the TUC array in the response of link you provided).

Snakecase in a retrofit call with gson

I am using the original retrofit to call the Instagram api. The call returns this reponse
{ "data" : [ { "attribution" : null,
"caption" : { "created_time" : "1460953831",
"from" : { "full_name" : "Edward ♕",
"id" : "282525924",
"profile_picture" : "https://scontent.cdninstagram.com/t51.2885-19/s150x150/12519400_165282517199271_1363863979_a.jpg",
"username" : "manlike_eddy"
},
"id" : "17847512245075242",
"text" : "Oh girl"
},
"comments" : { "count" : 1,
"data" : [ { "created_time" : "1460953885",
"from" : { "full_name" : "Edward ♕",
"id" : "282525924",
"profile_picture" : "https://scontent.cdninstagram.com/t51.2885-19/s150x150/12519400_165282517199271_1363863979_a.jpg",
"username" : "manlike_eddy"
},
"id" : "17847512257075242",
"text" : "#love #TagsForLikes #TagsForLikesApp #instagood #me #smile #follow #cute #photooftheday #tbt #followme #girl #beautiful #happy #picoftheday #instadaily #food #swag #amazing #TFLers #fashion #igers #fun #summer #instalike #bestoftheday #smile #like4like #friends #instamood"
} ]
},
"created_time" : "1460953831",
"filter" : "Normal",
"id" : "1230892414266144399_282525924",
"images" : { "low_resolution" : { "height" : 320,
"url" : "https://scontent.cdninstagram.com/t51.2885-15/s320x320/e35/12965764_932183320233898_1928407701_n.jpg?ig_cache_key=MTIzMDg5MjQxNDI2NjE0NDM5OQ%3D%3D.2.l",
"width" : 320
},
"standard_resolution" : { "height" : 640,
"url" : "https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12965764_932183320233898_1928407701_n.jpg?ig_cache_key=MTIzMDg5MjQxNDI2NjE0NDM5OQ%3D%3D.2.l",
"width" : 640
},
"thumbnail" : { "height" : 150,
"url" : "https://scontent.cdninstagram.com/t51.2885-15/s150x150/e35/c257.0.565.565/12950340_1566398773652655_1170974002_n.jpg?ig_cache_key=MTIzMDg5MjQxNDI2NjE0NDM5OQ%3D%3D.2.c",
"width" : 150
}
},
"likes" : { "count" : 0,
"data" : [ ]
},
"link" : "https://www.instagram.com/p/BEVAiEVDnaP/",
"location" : null,
"tags" : [ "beautiful",
"cute",
"fashion",
"love",
"summer",
"food",
"instalike",
"tbt",
"tagsforlikesapp",
"igers",
"follow",
"instadaily",
"instamood",
"friends",
"girl",
"me",
"swag",
"like4like",
"tflers",
"followme",
"instagood",
"tagsforlikes",
"amazing",
"bestoftheday",
"fun",
"smile",
"photooftheday",
"picoftheday",
"happy"
],
"type" : "image",
"user" : { "full_name" : "Edward ♕",
"id" : "282525924",
"profile_picture" : "https://scontent.cdninstagram.com/t51.2885-19/s150x150/12519400_165282517199271_1363863979_a.jpg",
"username" : "manlike_eddy"
},
"user_has_liked" : false,
"users_in_photo" : [ ]
} ],
}
}
As you can see some of the labels are using snakecase, such as standard_resolution. When I plug this data into Json Pogo it creates two classes for standard_resolution. One named StandardResolution and one StandardResolution. When I call .getStandardResolution() on the respective object null is returned, even though it should have valid data.

How to decode json+collection in Android [duplicate]

This question already has answers here:
Sending and Parsing JSON Objects in Android [closed]
(11 answers)
Closed 7 years ago.
I have a json+collection string as following:
//code formated
{ "collection" :
{
"version" : "1.0",
"href" : "http://example.org/friends/",
"links" : [
{"rel" : "feed", "href" : "http://example.org/friends/rss"}
],
"items" : [
{
"href" : "http://example.org/friends/jdoe",
"data" : [
{"name" : "full-name", "value" : "J. Doe", "prompt" : "Full Name"},
{"name" : "email", "value" : "jdoe#example.org", "prompt" : "Email"}
],
"links" : [
{"rel" : "blog", "href" : "http://examples.org/blogs/jdoe", "prompt" : "Blog"},
{"rel" : "avatar", "href" : "http://examples.org/images/jdoe", "prompt" : "Avatar", "render" : "image"}
]
},
{
"href" : "http://example.org/friends/msmith",
"data" : [
{"name" : "full-name", "value" : "M. Smith", "prompt" : "Full Name"},
{"name" : "email", "value" : "msmith#example.org", "prompt" : "Email"}
],
"links" : [
{"rel" : "blog", "href" : "http://examples.org/blogs/msmith", "prompt" : "Blog"},
{"rel" : "avatar", "href" : "http://examples.org/images/msmith", "prompt" : "Avatar", "render" : "image"}
]
},
{
"href" : "http://example.org/friends/rwilliams",
"data" : [
{"name" : "full-name", "value" : "R. Williams", "prompt" : "Full Name"},
{"name" : "email", "value" : "rwilliams#example.org", "prompt" : "Email"}
],
"links" : [
{"rel" : "blog", "href" : "http://examples.org/blogs/rwilliams", "prompt" : "Blog"},
{"rel" : "avatar", "href" : "http://examples.org/images/rwilliams", "prompt" : "Avatar", "render" : "image"}
]
}
],
"queries" : [
{"rel" : "search", "href" : "http://example.org/friends/search", "prompt" : "Search",
"data" : [
{"name" : "search", "value" : ""}
]
}
],
"template" : {
"data" : [
{"name" : "full-name", "value" : "", "prompt" : "Full Name"},
{"name" : "email", "value" : "", "prompt" : "Email"},
{"name" : "blog", "value" : "", "prompt" : "Blog"},
{"name" : "avatar", "value" : "", "prompt" : "Avatar"}
]
}
}
}
sample linK: http://amundsen.com/media-types/collection/examples/
Can you please help me on how to decode this message. I have to read items , queries into my code and also version etc. I have to do this on android. I am not able to get how to use JSONObject to fetch the items, queries into my code.
For the array objects use JSONArray. Method arr.length() returns elements count, arr.get<type>(position) or just arr.get(position) for getting element.
you may use:
import org.json.JSONException;
import org.json.JSONObject;
in the following way:
try {
JSONObject myObj = new JSONObject("your json string");
} catch (JSONException e) {
e.printStackTrace();
}

Google map search place in Android

I am working on Android application in which I want to get the coordinates of the search place. Right now I am only getting the names and description of the place but not the coordinates that it Latitude and Longitude. My URL and response is given below.
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=karachi&sensor=true&key=MY_KEY
{
"predictions" : [
{
"description" : "Karachi Darbar - 10th Street - Oud Metha - Dubai - United Arab Emirates",
"id" : "66487f019fefe55e2fdd889a5902661dd8bce4eb",
"matched_substrings" : [
{
"length" : 7,
"offset" : 0
}
],
"place_id" : "ChIJW_YoydNCXz4RwTx4gOxOrTg",
"reference" : "CmRVAAAAZ2JaZnVCxKFxn3qtlI0adppFvEJoe-D3NUQWNN0AIfUl0yhKFVm6F_yt2VUGW3x4j5DN6y5jxgkpgVNGCMgE7gxnZ2D1oHpZMEyeuaPgQBmrhP4OrsK0K5ZqLJJPNUOVEhBUBctSVLyD65tVUo0H3jeFGhSln3l44jAdvrmAQi6kSEOEdfHhPg",
"terms" : [
{
"offset" : 0,
"value" : "Karachi Darbar"
},
{
"offset" : 17,
"value" : "10th Street"
},
{
"offset" : 31,
"value" : "Oud Metha"
},
{
"offset" : 43,
"value" : "Dubai"
},
{
"offset" : 51,
"value" : "United Arab Emirates"
}
],
"types" : [ "establishment" ]
},
{
"description" : "Karachi Darbar - 33 B Street - Al Karama - Dubai - United Arab Emirates",
"id" : "bb3e1227cce8b23d3ff172a3285db2defd742de7",
"matched_substrings" : [
{
"length" : 7,
"offset" : 0
}
],
"place_id" : "ChIJB4u8R9dCXz4RUeKUXKVjgOE",
"reference" : "CmRWAAAAfVwdVthVlSfEK10__jrSkqQpBCmc_JILX3Ya7eA09oiweiGwCoq8MoqVzQ9BTOnN7MWfD5RTL83jlWcTvypFEEsMliHpBhsytKTiCAXMn90ffjcS037VRziEBKW53WbsEhCoOZZ7H2jv_GtaP52wA2FhGhQsw8ltBOqHCxEK1gTefMfQ4qzzbA",
"terms" : [
{
"offset" : 0,
"value" : "Karachi Darbar"
},
{
"offset" : 17,
"value" : "33 B Street"
},
{
"offset" : 31,
"value" : "Al Karama"
},
{
"offset" : 43,
"value" : "Dubai"
},
{
"offset" : 51,
"value" : "United Arab Emirates"
}
],
"types" : [ "establishment" ]
},
{
"description" : "Karachi Darbar - Al Karama - Dubai - United Arab Emirates",
"id" : "7ab1b31e281218ec69777aede6d28b3bf5a70f90",
"matched_substrings" : [
{
"length" : 7,
"offset" : 0
}
],
"place_id" : "ChIJb3yfr95CXz4RU4qzVfNY5Bs",
"reference" : "ClRHAAAAlB1PCqHp8_JAMSmpWa29T9XiQ3Wa9qh6ttuC1wh9L3axfEAngculrdf989Z0WrohwyUcytxkPLIH9CZzddphWz26R1b8NkJuCKuQKTqKEb0SEMvw3t6N-ZMX5MCeW9Gh10QaFKSoBa8LaQTjcIocrwlvHumQEIoT",
"terms" : [
{
"offset" : 0,
"value" : "Karachi Darbar"
},
{
"offset" : 17,
"value" : "Al Karama"
},
{
"offset" : 29,
"value" : "Dubai"
},
{
"offset" : 37,
"value" : "United Arab Emirates"
}
],
"types" : [ "establishment" ]
},
{
"description" : "Karachi, Sindh, Pakistan",
"id" : "e65bd2b56cea82ce2b33391e9deee4951396ece7",
"matched_substrings" : [
{
"length" : 7,
"offset" : 0
}
],
"place_id" : "ChIJv0sdZQY-sz4RIwxaVUQv-Zw",
"reference" : "CjQwAAAAqul1rii1VJ6L-fd1hiMQbpvPLHyAwaomCTG_6l_7PPkz1jwqWqkl51bavj1CGLdKEhAk6GFORGWurnJAqE2xzm29GhQoVDUqp11bs7O_B8DOLpTumCAgzw",
"terms" : [
{
"offset" : 0,
"value" : "Karachi"
},
{
"offset" : 9,
"value" : "Sindh"
},
{
"offset" : 16,
"value" : "Pakistan"
}
],
"types" : [ "locality", "political", "geocode" ]
},
{
"description" : "Karachi Darbar Restaurant - Al Mateena Street - Deira - Dubai - United Arab Emirates",
"id" : "7b28747c93dc316b477e11e75bede5da26d7bdab",
"matched_substrings" : [
{
"length" : 7,
"offset" : 0
}
],
"place_id" : "ChIJLbxiB7dcXz4RUy9ny3FXR9Y",
"reference" : "CnRjAAAAs97khr1wHc1GeYxYTt2pRhv9NJPpNtekSGXLz22C6SJfo-6MKapTrnbAg1F_GzwDOuj87kiQe4inXDhFdBqcdH1a7BColMli3wRmuR76ib3AV4ouLuqqHYrZ0IrVeRsNDtjEHfPWyiKsLFrgB9jcIxIQ3z3-VFwCHUHHYa1_PvH6SxoUa7crfBXrD-Ma7Sr2pJGjoagJpeU",
"terms" : [
{
"offset" : 0,
"value" : "Karachi Darbar Restaurant"
},
{
"offset" : 28,
"value" : "Al Mateena Street"
},
{
"offset" : 48,
"value" : "Deira"
},
{
"offset" : 56,
"value" : "Dubai"
},
{
"offset" : 64,
"value" : "United Arab Emirates"
}
],
"types" : [ "establishment" ]
}
],
"status" : "OK"
}
You need to use Place ID tag to get Lat/Long
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJb3yfr95CXz4RU4qzVfNY5Bs&key=AddYourOwnKeyHere
The best way is that you have to use the geocode api of google like as
http://maps.google.com/maps/api/geocode/json?address=karachi&sensor=false
If the limited access then no need any google api key.
In response, there is a json object "location" inside "geometry" where lat and lng present which will give you a co-ordinate of your entered location (karachi)
geometry: {
bounds: {
northeast: {
lat: 25.2703106,
lng: 67.46845189999999
},
southwest: {
lat: 24.7519801,
lng: 66.6609568
}
},
location: {
lat: 24.8614622,
lng: 67.0099388
},
location_type: "APPROXIMATE",
viewport: {
northeast: {
lat: 25.2703106,
lng: 67.46845189999999
},
southwest: {
lat: 24.7519801,
lng: 66.6609568
}
}
}

Comments in Google Place

I saw in the official documentation of google places : https://developers.google.com/places/documentation/search
that the response gave from the server to search is :
"results" : [
{
"formatted_address" : "529 Kent Street, Sydney NSW, Australia",
"geometry" : {
"location" : {
"lat" : -33.8750460,
"lng" : 151.2052720
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
"id" : "827f1ac561d72ec25897df088199315f7cbbc8ed",
"name" : "Tetsuya's",
"rating" : 4.30,
"reference" : "CnRmAAAAmmm3dlSVT3E7rIvwQ0lHBA4sayvxWEc4nZaXSSjRtfKRGoYnfr3d5AvQGk4e0u3oOErXsIJwtd3Wck1Onyw6pCzr8swW4E7dZ6wP4dV6AsXPvodwdVyqHgyGE_K8DqSp5McW_nFcci_-1jXb5Phv-RIQTzv5BjIGS0ufgTslfC6dqBoU7tw8NKUDHg28bPJlL0vGVWVgbTg",
"types" : [ "restaurant", "food", "establishment" ]
}...
I would like to know if it is posible to reach info like comments,
basically to reach more info that those 8 variables.
Tx !
it is disponible en :
"results" : [
"reviews" : [
{
"aspects" : [
{
"rating" : 3,
"type" : "quality"
}
],
"author_name" : "Simon Bengtsson",
"author_url" : "https://plus.google.com/104675092887960962573",
"text" : "Just went inside to have a look at Google. Amazing.",
"time" : 1338440552869
},
{
"aspects" : [
{
"rating" : 3,
"type" : "quality"
}
],
"author_name" : "Felix Rauch Valenti",
"author_url" : "https://plus.google.com/103291556674373289857",
"text" : "Best place to work :-)",
"time" : 1338411244325
},
{
"aspects" : [
{
"rating" : 3,
"type" : "quality"
}
],
"author_name" : "Chris",
"text" : "Great place to work, always lots of free food!",
"time" : 1330467089039
}
],
"types" : [ "establishment" ],
"url" : "http://maps.google.com/maps/place?cid=10281119596374313554",
"vicinity" : "48 Pirrama Road, Pyrmont",
"website" : "http://www.google.com.au/"
},
Official page: https://developers.google.com/places/documentation/details

Categories

Resources