[webmap-discuss] Re: Using JSON instead of XML for OGC documents
adoyle at eogeo.org
Fri Nov 17 16:32:56 EST 2006
On Nov 17, 2006, at 14:37, Cameron Shorter wrote:
> The biggest win for web browsers (performace wise) would be if Web
> Feature Services could return GML in JSON format. I'd imagine this
> would be relatively easy to incorporate into the WFS spec.
AFAIK the WFS spec allows for alternate return formats. I know some
people have used WFS's to return shapefiles. It should be a matter of
declaring a MIME type in the capabilities or something.
> Disclaimer: I still haven't done any performance tests with JSON.
> Raj Singh wrote:
>> Martin echoes my initial reaction. The bigger picture is the
>> reliance on XML data structures for information content. I don't
>> think it's a good idea to consider abandoning such a flexible,
>> well-understood, expressive format just because it's not ideal
>> for one platform (Web browsers), even if that platform is perhaps
>> the primary parser of some document types.
>> Maybe a good long term strategy is to go with XML as the
>> canonical document format, but have some sort of "header" section
>> that points to other formats (or services that produce
>> alternative formats). And make that header easy enough to read
>> that text parsers can easily pull out enough information to avoid
>> the rest and go get their preferred document format. This
>> strategy could apply not only to static document formats like
>> Context and SLD, but also to service responses like GetCapabilities.
>> On Nov 16, 2006, Martin Daly wrote:
>>> We've also looked into JSON a bit, although not for Context
>>> In this case not using XML for the first step seems to be just
>>> the inevitable? That is, after you have the context data, the
>>> next step
>>> is always to get the capabilities of the server (see the recent e-
>>> trail about, for example, GetMap and GetCapabilities not sharing the
>>> same URL root).
>>> Unless all of the references services/data area also returned as
>>> then you will be parsing XML sooner rather than later.
>> On Nov 16, 2006, at 5:34 PM, Cameron Shorter wrote:
>>> Context working group,
>>> Regarding: http://json.org
>>> There has been discussion amongst http://openlayers.org
>>> developers about using JSON instead of XML for storing OGC
>>> documents (like OGC Context, WMC, and probably a host of other
>>> documents too).
>>> The reason for considering JSON over XML are:
>>> * In Web Browsers, XML support is patchy.
>>> * Consequently extra code is required to be downloaded to cover
>>> all browsers.
>>> * In browser clients, code size is a major consideration as
>>> * JSON is reportedly faster to process.
>>> JSON reportedly has all the other advantages of XML like being
>>> structured, easy to read, is supported by multiple languages etc.
>>> One thing discussed is standing up XML<->JSON services.
>>> I'd be interested to hear comments from OGC participants on
>>> these ideas.
>>> Feel free to foward onto others more appropriate.
>>> Cameron Shorter
> Cameron Shorter
> To unsubscribe, e-mail: webmap-discuss-unsubscribe at mail.osgeo.org
> For additional commands, e-mail: webmap-discuss-help at mail.osgeo.org
adoyle at eogeo.org
More information about the Webmap-discuss