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

204RE: [json] Reference Implementations

Expand Messages
  • Atif Aziz
    Jan 11, 2006
      I think you are contradicting yourself and proving my point. :-)

      >>
      But in some cases, you might want to be looser. There are lots of data
      representations out there. Many of them are very similar to JSON, but
      not strictly JSON. A loose parser makes it easy to import such data
      into a JSON system.
      <<

      So why doesn't the same argument fly for any JSON parser implementation,
      including the JavaScript one that used to be indeed once liberal? Those
      implementations that wish to be anal will simply not cut it in the real
      world. I think it's wiser to allow the user of a parser to determine the
      trade-off policies rather than enforce them.

      > JSON is a strict subset of...YAML

      Can you absolutely confirm this? Is it true today? I have not seen this
      claim anywhere. In fact, I have read that it has the potential to become
      a subset if some adjustments are made to the YAML specs or otherwise if
      care is observed during encoding.

      > The latitude allowed parsers is not given to encoders.

      Yes, yes!

      - Atif

      -----Original Message-----
      From: json@yahoogroups.com [mailto:json@yahoogroups.com] On Behalf Of
      Douglas Crockford
      Sent: Thursday, January 05, 2006 5:44 PM
      To: json@yahoogroups.com
      Subject: [json] Reference Implementations

      The Java implementation at JSON.org is very liberal in the texts that
      it will accept. The JavaScript implementation is very strict. A JSON
      encoder must generate strictly conforming texts. So there is the
      question, why would we want a liberal parser?

      In some cases we don't, which is why the JavaScript version is strict,
      and why JSON_checker is strict.

      But in some cases, you might want to be looser. There are lots of data
      representations out there. Many of them are very similar to JSON, but
      not strictly JSON. A loose parser makes it easy to import such data
      into a JSON system.

      It also allows JSON to be a subset of other formats. JSON is a strict
      subset of JavaScript and YAML, and perhaps other languages as well.
      Anything that accepts strict JSON text is a JSON parser.

      The latitude allowed parsers is not given to encoders.






      Yahoo! Groups Links
    • Show all 4 messages in this topic