microformats2-mime-type: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(note adoption in the wild of one particular option)
(more context, note historical, steer to GitHub issue instead)
 
Line 1: Line 1:
This page is for discussing the potential benefits and disadvantages of registering a MIME type for [[microformats2]].
This page is for discussing the potential benefits and disadvantages of registering a MIME type for [[microformats2]] canonical JSON resulting from a [[microformats2-parsing]] implementation.
 
{{note|This page is historical from ~2015. Please see and comment on the GitHub issue: <br/> https://github.com/microformats/microformats2-parsing/issues/52}}


== Potential MIME types ==
== Potential MIME types ==

Latest revision as of 19:25, 6 August 2020

This page is for discussing the potential benefits and disadvantages of registering a MIME type for microformats2 canonical JSON resulting from a microformats2-parsing implementation.

ℹ️ Note: This page is historical from ~2015. Please see and comment on the GitHub issue:
https://github.com/microformats/microformats2-parsing/issues/52

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