GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
XML/JSON inconsistent result  XML
Forum Index -> General
Author Message
spacedman



Joined: 27/09/2008 16:45:38
Messages: 1
Offline

This query, taken straight from the docs, returns XML with a number of countrySubdivision records within a <geonames> tag:

http://ws.geonames.org/countrySubdivision?lat=47.03&lng=10.2&maxRows=10&radius=60

but the corresponding JSON request doesn't:

http://ws.geonames.org/countrySubdivisionJSON?lat=47.03&lng=10.2&maxRows=10&radius=60

- it seems to only return one record, whatever you do with radius and maxRows...


marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

This is true. The list of divisions was a feature that was added later to the service and it was easy to add an additional xml element, but the json response did not allow for an additional document. As nobody was asking it we did not add the feature to the json response.

Marc

[WWW]
MTolman


[Avatar]

Joined: 12/10/2008 23:34:25
Messages: 1
Location: Boston
Offline

The JSON and XML output from findNearbyPostalCodes is also inconsistent.

For example: XML uses 'name', JSON uses 'placeName', and the JSON doesn't include the distance.

mark

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
- Anonymous
[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team