Hi - I did some debugging and it looks like Bing is returning an illegal
JSON response string. See below. If I add some perl code to remove the
".d" from the end of the JSON response prior to calling from_json, things
seem to work.
$VAR1 =
'{"d":{"__type":"Microsoft.VirtualEarth.Engines.Core.Geocoding.GeocodingResponse","Results":[{"Name":"44111,
OH","Type":132,"BestLocation":{"Precision":0,"Coordinates":{"Latitude":41.461782082915306,"Longitude":-81.788370832800865}},"Locations":[{"Precision":0,"Coordinates":{"Latitude":41.461782082915306,"Longitude":-81.788370832800865}}],"BestView":{"NorthEastCorner":{"Latitude":41.494351476430893,"Longitude":-81.732288524508476},"SouthWestCorner":{"Latitude":41.425825729966164,"Longitude":-81.853183731436729},"Type":0,"Center":{"Latitude":41.46009765414118,"Longitude":-81.7927361279726}},"Shape":null,"Address":{"AddressLine":"","Locality":"","PostalTown":"","District":"","AdminDistrict":"Ohio","PostalCode":"44111","CountryRegion":"United
States","FormattedAddress":"44111,
OH"},"CountryRegion":244,"MatchConfidence":0,"MatchCode":1},{"Name":"44111,
Spain","Type":132,"BestLocation":{"Precision":0,"Coordinates":{"Latitude":40.435658767819405,"Longitude":-1.5249820053577423}},"Locations":[{"Precision":0,"Coordinates":{"Latitude":40.435658767819405,"Longitude":-1.5249820053577423}}],"BestView":{"NorthEastCorner":{"Latitude":40.501547232270241,"Longitude":-1.4213890582323074},"SouthWestCorner":{"Latitude":40.371515080332756,"Longitude":-1.6472672671079636},"Type":0,"Center":{"Latitude":40.436562591324275,"Longitude":-1.5343281626701355}},"Shape":null,"Address":{"AddressLine":"","Locality":"","PostalTown":"","District":"","AdminDistrict":"","PostalCode":"44111","CountryRegion":"Spain","FormattedAddress":"44111,
Spain"},"CountryRegion":217,"MatchConfidence":1,"MatchCode":1}],"ParsedAddress":{"AddressLine":"","Locality":"","PostalTown":"","District":"","AdminDistrict":"","PostalCode":"44111","CountryRegion":"","FormattedAddress":"44111"},"ParsedKeyword":"","ParsedSeparator":"","VendorIds":null,"ResponseSummary":{"Copyright":"Copyright
© 2009 Microsoft and its suppliers. All rights reserved. This API cannot be
accessed and the content and any results may not be used, reproduced or
transmitted in any manner without express written permission from Microsoft
Corporation.","StatusCode":0,"AuthResultCode":0,"ErrorMessage":null,"TraceId":"b7ba3a38-1734-4f4d-b730-07a8165643b6|BY2PLAT012"}}}.d';
garbage after JSON object, at character offset 2214 (before "d") at
/usr/local/share/perl/5.10.0/Geo/Coder/Bing.pm line 94