text/markdown effort in IETF (invite)
contact at alanhogan.com
Thu Jul 10 16:55:34 EDT 2014
On Jul 10, 2014, at 8:49 AM, Waylan Limberg <waylan.limberg at icloud.com> wrote:
> In my experience, REST API's (for example) use JSON or XML which may contain some Markdown text among other data. That other data may identify that the text is "markdown", but the mime type for the file is JSON or XML (or at least the appropriate mime type for that file type).
I’m no [REST Police], but in my understanding, REST encourages the embracing of HTTP verbs to perform actions on hypertext objects. Consider an API call that updates the Markdown source of a blog post, for example. You are entirely correct that there is a strong chance that this API call would actually send an updated copy of a JSON object including fields such as “title”, “date”, “url”, and “body”, the last of which may implicitly or explicitly be Markdown data. (And the MIME type on that call would be application/json or whatever.) But perhaps the most RESTful way to do this would be to send a plain Markdown file (as text/markdown). (As far as the metadata goes, the server could extract the title from the markdown document itself (first level-one heading or first line of text, for example), set the date automatically, and so on.
That’s not to say that a JSON API for updating a blog post isn’t RESTful, but rather that the non-JSON, pure-Markdown API is where the new MIME type would be most needed.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Markdown-Discuss