GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Keep json attribute case constant for equal objects  XML
Forum Index -> General
Author Message
kusig



Joined: 14/10/2012 23:36:48
Messages: 2
Offline

Hi there
I encountered that the JSON attribute used in some types isn't the same case.

One time it is all lower case and another time it is "postalCode". As JSON attribute names are case sensitive, this leads to problems when trying to map this to the same Java type.

See:

view-source:http://api.geonames.org/postalCodeLookupJSON?postalcode=6600&country=AT&username=demo

view-source:http://api.geonames.org/postalCodeSearchJSON?postalcode=9011&maxRows=10&username=demo

Those seems to return the same types but the "postalcode" is different in case.
marc



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

I agree this is ugly and should not have happend in the first place.
Correcting it is difficult as it will break code of users.

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team