[OSM-dev] Nominatim json -- coment

Frederik Ramm frederik at remote.org
Fri Feb 26 13:32:44 GMT 2010


Hi,

Brian Quinion wrote:
> This content needs to be in the file.  Feel free to suggest
> alternative ways to format or present it but I don't think straight
> removal is possible.

I doubt that it "needs to be in the file"; the OSM API hands out OSM 
data without such comments and has worked quite well for a few years now!

If you feel it must be there, is there a JSON-compliant way to 
encapsulate it in a variable inside the structure returned?

> I'm uncertain why the json version would be parsed by anything but
> javascript - why not use the xml version?

JSON has become a data transfer format in its own right, and even used 
by applications that don't touch Javascript at all. If you offer a JSON 
interface then it ought to be JSON compliant. If you have a "Javascript 
can load and evaluate this to build a data structure but it is only 
guaranteed to work with Javascript" interface then don't call it JSON.

(Someone familiar with JSON but unfamiliar with XML will always chose 
the JSON if his client and your server offer both.)

Bye
Frederik






More information about the dev mailing list