microformats2-mime-type: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(new page)
 
(note adoption in the wild of one particular option)
Line 8: Line 8:
* application/microformats2+json
* application/microformats2+json
* application/mf2+json
* application/mf2+json
** Appears to have some adoption in the wild: https://indieweb.org/application/mf2+json
* application/uf2+json
* application/uf2+json



Revision as of 18:45, 6 August 2020

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