microformats2-mime-type

From Microformats Wiki
Revision as of 18:45, 6 August 2020 by Tantek (talk | contribs) (note adoption in the wild of one particular option)
Jump to navigation Jump to search

This page is for discussing the potential benefits and disadvantages of registering a MIME type for microformats2.

Potential MIME types

Note: None of these are officially registered MIME types. Until the IETF registers the MIME type, it is not official.


Advantages

  • if a user is using content negotiation, one URL can have both a microformats2 JSON representation (which is simply the parsed content of what the text/html or application/xhtml+xml view contains) and a site or domain specific JSON representation of their own (commonly used for APIs)
  • it provides a naming structure for other future formats that have (close to) bidirectional conversion support with the semantics of JSON (e.g. YAML, BSON, Apache Avro, Thrift) - we cannot assume that JSON will be around forever or that it will suit all use cases even if it seems like it currently is the best choice

Disadvantages

  • some HTTP libraries (e.g. Python's requests library) will use application/json to auto-parse JSON, but the routine that auto-parses JSON will not be activated on custom MIME types

Discussion

See also