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

1010Re: [json] MIME types

Expand Messages
  • Tatu Saloranta
    May 5, 2008
    • 0 Attachment
      On Mon, May 5, 2008 at 7:31 AM, kriszyp <kriszyp@...> wrote:

      > 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

      I think one big practical problem is that there doesn't seem to be a
      way to gracefully handle the problem of auto-detecting superset in
      use. That is, plain old JSON unfortunately has no place (similar to,
      say, xml declaration) to add something to allow processors to figure
      out if it's "plain" json or something else.
      While lack of such marker makes it easier to embed json (json
      encapsulation in json is trivial; in xml declaration & single-root
      requirement make it very cumbersome to embed xml in xml) it's a pain
      if one tries to extend markup itself.
      That's why I suspect it might be best that json remained as is, and
      further development was done at higher level by using what exists,
      instead of trying to shoehorn new features at low level ("just because
      something can be done don't mean it should").
      But then again, if it was accepted that things didn't remain backwards
      compatible, some features would be easy to add: things like comments
      (which I miss -- there's no way for generators to add notes as to
      sources, or time of generation), and have general usefulness.

      Anyway: my one comment regarding supersets is that any extensions to
      JSON itself should not be javascript-oriented.
      I really want "core" Json to remain language-agnostics (and become one
      in developers' minds); and if there are extensions that are more
      js-oriented, those be strict supersets which can be reliably detected,
      so that apps and systems that are not javascript-based can either
      ignore them, or downgrade processing suitably.

      -+ Tatu +-
    • Show all 9 messages in this topic