Hi , I would like parse data from google maps geocode version 3 through json. I would like to get details like locaityName, AdministrativeAreaName and status code. May I know how to parse these data? Thank you
A:
You can use the json_encode
and json_decode
functions to parse json data.
More info:
Sarfraz
2010-04-24 09:29:07
I would like to parse specific data from google geocode as I mentioned above. do you know the structure of parsing these data? Thanks.
benmsia
2010-04-24 10:11:18
A:
PHP has json_decode() that will convert a JSON data stream into a PHP array or object.
Pekka
2010-04-24 09:29:16
A:
Using the PHP PECL json library
json_decode()
http://php.net/manual/en/function.json-encode.php
Just an advice, if the function doesn't return anything that means that there is a syntax error into the JSON, it will not raise any error or log.
Cesar
2010-04-24 09:37:09