GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Why no total results count in JSON?  XML
Forum Index -> General
Author Message
Anonymous



It would be very useful to me for the total results count to be included. I would like to display the total matches (even if I don't retrieve and parse them all).

Can it be added without mucking up everyone else's JSON result parsing though?

For now I have settled for using the XML, but I'd prefer using the shorter JSON format.

It would also be useful for me to have the content length HTTP header variable set (a pedant could argue that it is 'netiquette').
marc



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

"totalResultsCount" has just been added to the JSON output :

http://ws.geonames.org/searchJSON?q=london&maxRows=10


The content length header is normally set, for large requests or for compressed responses it might not be set. Can you give us an example of a call you plan to use for which the content lenght is not set? How is your setting of the parameters "maxRows" and "style"?

Marc

[WWW]
Anonymous



Firstly; thanks for adding the total results to the JSON. I'm working with J2ME, so the smaller result sets are useful.

I may have confused re the content length. It is the XML results that I am not getting it for. The JSON appears to be returning it ok.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team