Media Types (note, they are not called MIME types anymore, the official name is Media Type and Media Subtype) are assigned by IANA. If you want to add a media type, you need to fill out the application and wait for it to be approved.
Both of your suggestions are illegal, because they are not registered Media Types.
The syntax of a Media Type is:
<media-type> MUST be one of the following:
In your case, since we are actually talking about executable code, the correct Type would be
There are four trees defined:
- The standard tree (no prefix)
- The vendor-specific tree (
- The personal (or "vanity") tree (
- The experimental tree (
x), which roughly corresponds to the older, now obsolete,
The standard tree is for representations defined in IETF standards or in standards of IETF-recognized standards bodies (e.g. ISO). AFAICS, NancyFX's format is not published in any such standard, so this tree is not appropriate.
The personal tree is for applications that are not published. This does not apply either.
The experimental tree is for experimental applications where the sender and receiver have a strong private agreement about the meaning of the Media Type. This is the only tree that does not require registration (in fact, you cannot register a Media Type in the experimental tree). Use of the experimental tree is strongly discouraged.
The vendor tree is for representations that are defined by published applications by some sort of vendor (or producer, as the standard also calls them). This would be the one that is applicable to NancyFX. So, the tree would be
The Media Subtype can be more or less freely chosen, but there of course restrictions about the length, allowed characters, and strong naming guidelines.
The Structured Syntax Suffix is used to indicate that the representation is actually an application of an underlying structured syntax that is shared by multiple representations. These suffixes also need to be registered. The currently registered suffixes are:
The format you describe is an application of a structured syntax (S-Expressions), so it should have structured syntax suffix. However, there is no suffix for S-Expressions currently defined.
The suffix should be something like
Putting it all together
Putting it all together, the correct Media Type for the representation you describe is:
But you are not allowed to use this until you have successfully registered the
s-expression structured syntax suffix, and the
nancy-fx media subtype in the vendor tree.