[GeoJSON] Content-type

Erik Wilde dret at berkeley.edu
Sun Nov 3 09:35:22 PST 2013


hello nelson.

On 2013-11-03, 09:25 , Nelson Minar wrote:
> It's too bad that MIME types only describe the encoding and not the
> actual contents, but that's the way the standards work.

that's not actually the case. that's the way some communities use them 
(semweb is one popular example), while others are using them 
differently. for RESTful web services, for example, many people are 
minting meaningful media types, instead of using very generic identifiers.

http://tools.ietf.org/html/rfc6839 is an attempt to make this a bit more 
structured, and then you could use application/geojson+json, making it 
both clear that it's GeoJSON, and JSON. but this would of course break 
compatibility with the current practice of using application/json, so 
maybe it's not such a great idea in the end for things that already are 
deployed.

> The main purpose
> of that type is to signal the user agent how to decode the thing (ie:
> it's JSON to turn into Javascript objects, not XML or HTML to turn into
> DOM or an image or whatever.) It's up to the application to inspect the
> object contents to determine what was in the JSON blob.

again, that's a result of designing things in a certain way, and maybe 
not the best possible one. to me, using profiles actually seems like a 
pretty good compromise: it's backwards compatible to those who use 
application/json, but still exposes the fact that the format is more 
than just generic JSON.

cheers,

dret.

-- 
erik wilde | mailto:dret at berkeley.edu  -  tel:+1-510-2061079 |
            | UC Berkeley  -  School of Information (ISchool) |
            | http://dret.net/netdret http://twitter.com/dret |



More information about the GeoJSON mailing list