Loading ...
Sorry, an error occurred while loading the content.

1009MIME types

Expand Messages
  • kriszyp
    May 5, 2008
    • 0 Attachment
      I wanted to see if there was any prevailing consensus on if and how
      JSON subsets and alternatives should be denoted with MIME types. There
      are a growing number of JSON subsets like JSON-RPC, JSONT, JsonML,
      JSON Schema, etc. There may be benefits in being able to define which
      subset is begin used as a MIME type. XML has used a subtype+xml
      convention, and I noticed that Stephen McKamey is using this precedent
      to suggest denoting JsonML as "application/jsonml+json". I am
      perfectly fine with using this convention, I just wanted to see if
      others felt this was the way to go, or if it is preferable to do more
      "minor" subtyping that would not suggest a need for IANA registration
      like "application/json; rpc", or something like that.

      I am also curious if there any thoughts about JSON supersets. There
      have been little efforts to create any formal proposals in this area,
      but I don't think it is totally uncommon to use additional JavaScript
      constructs for JSON-esque data, and postel's law application to JSON
      almost invariably means allowing for additional JavaScript defined
      flexibility (non-quoted keys, comments, etc). One could think of
      JavaScript expressions as a type unto themselves, the true superset of
      JSON (JavaScript itself is not actually a correct superset of JSON
      because JSON is not valid JavaScript by itself, it must be enclosed in
      paranthesis to make it a JavaScript expression). Generally JavaScript
      libraries that don't do validation before an eval (Dojo and many
      others) are actually full JavaScript expression acceptors, and
      non-JavaScript libraries and JavaScript libraries that do validation
      (like json.org's library) would be only JSON acceptors. I am wondering
      if MIME type definition might be valuable here as well (providers
      would know if they can include comments, for example).

      Anyway, I am not really making any proposals, just curious it there
      are prevailing feelings towards MIME types for defining different JSON
      formats.

      Thanks,
      Kris
    • Show all 9 messages in this topic