<div dir="ltr"><div class="im" style="font-family:arial,sans-serif;font-size:13px">On Sun, Nov 3, 2013 at 9:01 AM, Billy Newman <span dir="ltr"><<a href="mailto:newmanw10@gmail.com" target="_blank">newmanw10@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Is there a defined Content-Type for GeoJSON?</blockquote><div><br></div></div><div>application/json is the correct type. In practice most anything will work, the most important thing being that your web server knows to compress and cache the data appropriately.</div>
<div><br></div><div>It's too bad that MIME types only describe the encoding and not the actual contents, but that's the way the standards work. 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.</div>
<div><br></div><div>Speaking of which, given an arbitrary JSON object how do you tell if it's GeoJSON? I guess looking that it has a top level "type" whose value is "<font face="arial, sans-serif">FeatureCollection" or the like would work in practice.</font></div>
</div></div></div>