opengeospatial / ogcapi-connected-systems

Public Repository for the Connected Systems SWG
Other
6 stars 6 forks source link

Media Types #21

Closed alexrobin closed 1 week ago

alexrobin commented 1 year ago

In addition to application/json and application/geo+json, the following custom media types are currently defined in the draft documents:

For SWE Common:

For SensorML:

For the API:

Should we define them in the ogc vendor sub-tree instead? (like JSON-FG does), i.e.:

nmtoken commented 1 year ago

I find it odd that the media type is application instead of text considering that both JSON and XML are human readable.

https://www.rfc-editor.org/rfc/rfc2046.html tells us that

Application Media Type... is information which must be processed by an application before it is viewable or usable by a user

That's not true for JSON or XML

alexrobin commented 1 year ago

Yes, this is arguable, but all the following media types are already registered with IANA/IETF (see https://www.iana.org/assignments/media-types/media-types.xhtml).

So I think we ought to follow that pattern, or use the vendor sub-tree.

alexrobin commented 1 year ago

But you're right that there was ambiguity initially and that's probably why text/xml also exists. text/json was never registered though.

hylkevds commented 4 months ago

I think one is supposed to use the vnd. prefix as long as the type is not officially registered. GeoJSON used to be application/vnd.geo+json for this reason. Using vnd.ogc. as prefix nicely ensures a conflict-free use, though I doubt it is really necessary.

For application/om+json it may be better to add the s, since it's OMS now: application/oms+json