-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Official MIME Type? #465
Comments
Yes, +1, this would be along the lines of JSON. |
-1, if there is a MIME type, it should be |
I don't feel too strongly about this, but based on https://tools.ietf.org/html/rfc2046#section-3 I think Re:
Based on that, I think subtypes of I'd argue that, while TOML emphasizes human-readability, it's still primarily a data format, intended to be read by applications. As a contrast, a markdown file ( |
But we have text/{css,vcard,csv,html}. application/* sounds like it's not intended for people to read and write even it's text (like JSON or mbox). application/javascript is strange since many source types are text/* or text/x-*. |
@lilydjwg I agree that's how it sounds... But neither JSON and mbox are primarily intended to be human-read. That they're human-readable or not is incidental IMO. As for TOML, I still maintain that it's meaningless outside of the context of an application that parses it. A file written in TOML must be processed by some application in order for it to gain meaning. In contrast (and, in theory but not always in practice), you could read a file written in I'd also contend that we shouldn't use the existing registered MIME types, especially older ones, as particularly good examples of RFC 2046 conformance 😉 |
Thanks @mojombo! |
The README now says: "the appropriate MIME type is However, this seems very bad advice, since https://www.iana.org/assignments/media-types/media-types.xhtml knows no such MIME type. Unless the MIME type has officially been registered (assuming that anyone even plans to do that), |
I propose to re-open this and fix the README. |
@ChristianSi the IMO it's totally reasonable to recommend Again, the link to the registration form is https://www.iana.org/form/media-types... |
@hairyhenderson I stand corrected. However, I also note that the same RFC section says: "with the simplified registration procedures described above for vendor and personal trees, it should rarely, if ever, be necessary to use unregistered types." Hence I take it that the RFC does NOT recommend using x-free MIME types without registration. Also, assuming some Tim one day designs Tim's Original Multimedia Layout (TOML) and registers the appropriate MIME type before @mojombo comes around to do it. Then we would be in trouble.... Hence, forget about the |
+1 to registering the MIME type asap. |
Of course it doesn't - type registration is the subject of that RFC, after all 😉
I agree! But AFAIK, there's only one person who can reasonably do that 🙂
I think this is unlikely. TOML's a well-enough-known format by now... And encouraging common usage of |
In case anyone wants to help drive the registration process: #574 ❤️ |
@hairyhenderson -- You've got this wrong here. The point of the text/* media type vs application/* is toward displaying the file to the user. An application/* object should make no sense to a user, and so a system should not even attempt to present it except within the context of its application. For instance, given an attachment in an email, and the user clicks on it, the client should not present it, unless it knows how to handle that type. A text/* object however, should be displayed as text even if the client doesn't know what to do with it. The point for text/* isn't that it should represent long-textual data, but rather that it is likely to be fully readable by a human as opposed to application/*, which is not. The former is the very point of TOML. As for JSON, "application/json" is correct, because although the user can parse it, the purpose of JSON was always to be a limited data format, not necessarily an easily readable one. Hence the long disputed decision that it cannot have comments. Nor does it dictate any human readable whitespace / newlines. Sorry to re-open a long dead, closed issue, and I don't mean to bikeshead, but whereas one might see this as trivial, I see a correct mime type as very important. |
I think that over-simplifies things, but even with this simplification, Again, from the MIME RFC:
The common usage of TOML is not primarily as an "enriched text" format. I wouldn't write a blog post in TOML, for example. From this repo's README:
TOML is specifically defined as a config format, and even though it may be easy to read, it's still impossible for a human to gain the intended value of a TOML file on its own. To actually gain the value of a TOML file, I'd need to pair it with some software to process it. Unfortunately RFC 2046 is somewhat unclear, likely due to the rarity back in 1996 of human-readable non-binary configuration formats. Besides, the use of MIME types has long since escaped the realm of "Internet Mail", in ways that I'm sure the authors did not at all expect! Ultimately, until someone goes through the process of registering with IANA, there won't be any official type, and any argument around which one to use will simply be bikeshedding 😉
If so, please help out with #574! |
Or both :) Ceci n'est pas une bikeshed From inspecting the mimetype list: https://www.iana.org/assignments/media-types/text/xml ( |
@patcon That's an interesting point, though XML is a bit "special" in that it can be used both to represent both formatted text and configuration/data intended to be processed by applications. Comparing TOML to XML is a bit of an apples-to-oranges comparison. XML is a generalized Markup Language, and a file in XML format is completely devoid of semantics outside of the context of a schema. Mapping XML to a data structure requires a schema to do so unambiguously, whereas TOML can be mapped unambiguously without a schema. I think it's probably more appropriate to compare TOML with JSON or YAML, of which only one has a registered media type: |
I'm late to this shindig, but here's my take. I've read convincing arguments for both I scanned https://www.iana.org/assignments/media-types/media-types.xhtml and looked for prominent keywords.
The registered types certainly don't force usage, and they don't reflect what's used in the wild necessarily, but they do give clear intentions as to what is intended by the content type. Maybe the dual approach suggested by @patcon would be best. But based on current usage and on previous types, |
That's a good summary @eksortso, thanks for digging into it.
Yeah - I don't know why... FWIW I just filed yaml/yaml-spec#49 to suggest it 😉 |
I'm gonna shut up cause I'm clearly bikeshedding, then. Sorry about that. But, I will leave this, conversation on XML's mimetype: I am not sure how to help on #574 -- But I will try! |
One argument against using It should be noted however that there are configuration formats in I support using both |
Only the old "Classic MacOS" used CR as line endings, as did some other old systems like the Commodore 64, but none of that is really relevant any more. Current OS-X/macOS uses a LF ( |
There doesn't seem to be a registered MIME Type for TOML - are there any plans to register one?
From some quick google searching I see one use of
text/x-toml
, but I'd suggestapplication/toml
as a more appropriate type.If an application hasn't been started yet, here is the place to start: https://www.iana.org/form/media-types.
Thanks!
The text was updated successfully, but these errors were encountered: