GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
CountryInfo API has data missing in JSON format vs XML  XML
Forum Index -> General
Author Message
paulw77



Joined: 14/10/2020 22:09:29
Messages: 6
Offline

The PostalFormat field is missing from the JSON version of the API. It exists in the XML version.

I guess the best way to show this is with an example.

http://api.geonames.org/countryInfo?username=<username>

<geonames>
<country>
<countryCode>AD</countryCode>
<countryName>Andorra</countryName>
<isoNumeric>020</isoNumeric>
<isoAlpha3>AND</isoAlpha3>
<fipsCode>AN</fipsCode>
<continent>EU</continent>
<continentName>Europe</continentName>
<capital>Andorra la Vella</capital>
<areaInSqKm>468.0</areaInSqKm>
<population>77006</population>
<currencyCode>EUR</currencyCode>
<languages>ca</languages>
<geonameId>3041565</geonameId>
<west>1.413760001000071</west>
<north>42.65576500000003</north>
<east>1.786576000000025</east>
<south>42.42874300100004</south>
<postalCodeFormat>AD###</postalCodeFormat>
</country>

http://api.geonames.org/countryInfoJSON?username=<username>

{
"geonames": [{
"continent": "EU",
"capital": "Andorra la Vella",
"languages": "ca",
"geonameId": 3041565,
"south": 42.42874300100004,
"isoAlpha3": "AND",
"north": 42.65576500000003,
"fipsCode": "AN",
"population": "77006",
"east": 1.786576000000025,
"isoNumeric": "020",
"areaInSqKm": "468.0",
"countryCode": "AD",
"west": 1.413760001000071,
"countryName": "Andorra",
"continentName": "Europe",
"currencyCode": "EUR"
},
bhujagendra


[Avatar]
Joined: 28/11/2020 11:56:56
Messages: 5
Offline

I can confirm this. Also the style=full parameter doesn't help.

Is there a chance to complete the JSON format

Thanks,
Bhujagendra
marc



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

thanks for reporting this bug. The fix should now be available on all servers.

Best Regards

Marc

[WWW]
bhujagendra


[Avatar]
Joined: 28/11/2020 11:56:56
Messages: 5
Offline

Thank you, Marc

I can confirm that the post code format is now included. Awesome!

Bhujagendra.
paulw77



Joined: 14/10/2020 22:09:29
Messages: 6
Offline

bhujagendra wrote:
Thank you, Marc

I can confirm that the post code format is now included. Awesome!

Bhujagendra. 


Same here. Thank You for the fix.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team