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

1801Re: A couple of JSON questions

Expand Messages
  • douglascrockford
    Jan 2, 2012
    • 0 Attachment
      --- In json@yahoogroups.com, "Paul C. Bryan" <paul.bryan@...> wrote:
      >
      > I'm hoping someone can help explain the rationale behind a couple of
      > points in the JSON specification:
      >
      > 1. 8bit content-transfer-encoding for UTF-8
      >
      > RFC 4627: "When JSON is written in UTF-8, JSON is 8bit compatible." Why
      > was 8bit selected rather than binary content-transfer-encoding? This
      > limits the length of JSON strings to 994 octets.

      JSON does not impose such a limit.

      > 2. Non-unique object members
      >
      > RFC 4627: "The names within an object SHOULD be unique." Why was SHOULD
      > selected rather than MUST?

      This was so that ECMAScript's eval function could act as a JSON parser. I think it should have been MUST.
    • Show all 9 messages in this topic