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: 4
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"
},
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team