[OSM-dev] Nominatim json -- coment
Peter Körner
osm-lists at mazdermind.de
Fri Feb 26 08:17:18 GMT 2010
Peter Körner schrieb:
> This breaks one of our tools that uses the php json_decode function
In the meantime you may strip out the comment like this:
$json = file_get_contents('http://nominatim.openstreetmap.org/'.
'?format=json&q='.rawurlencode($q)));
if(!$json) return;
$json = preg_replace('@^/\*.*\*/@', '', $json);
$data = json_decode($json);{
if(!$data) return;
. . .
Peter
More information about the dev
mailing list