-
Notifications
You must be signed in to change notification settings - Fork 8
Records formatting #12
Comments
OH, we could actually use vendor specific data in the Accept / Content-Type fields. For instance "application/geojson+json" / "application/json" ? |
AFAIK there is no consensus for geojson mimetype. I used How do we trigger the geojson serializer otherwise ? |
You're right, I don't like application/geojson or application/geo+json :) And we can't just make up new application media types, they need to be registered. I recommend following http://tools.ietf.org/html/rfc6906 and adding a profile media type parameter like
We'll have a standard GeoJSON profile URI at some point, but I'm not sure what it would be. In the meanwhile, you can make one specifically for your spiral-project GeoJSON files. |
Profiles might effectively be an idea. It also means we need to extend SPORE to support this concept and check cornice / pyramid allow this easily. |
Thanks Sean for taking time to give hints on that ! |
Accept
HTTP directive may not be enough to format records.For example, getting the records of a model which contain a geometry as JSON may have two formattings :
[ {...}, {...} ]
){ "type": "FeatureCollection", "features": [{...}, {...}]
), that integrates nicely in JS map widgets like Leaflet.Both are valid JSON. We might need a
?format=XXX
parameter to specify which layout it should have.The text was updated successfully, but these errors were encountered: