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

778Re: [json] Re: JSON -- rfc question -- Encoding

Expand Messages
  • Michael Schwarz
    Apr 13, 2007
      I have one more question, do I need to convert unicode characters to
      something like "\u12345"?

      Michael


      On 13 Apr 2007 15:47:13 -0700, Douglas Crockford <douglas@...>
      wrote:
      >
      > --- In json@yahoogroups.com <json%40yahoogroups.com>, "json_is_clever"
      > <vendor@...> wrote:
      >
      > > The implementer claims that because Unicode is not a binary encoding,
      > > but a set of codepoints, that this sentence means that Unicode
      > > codepoints should be used in some manner to represent characters, but
      > > that the bitstream that represents the JSON text could use escapes for
      > > most of the characters (reducing the size of the character
      > > repertoire), and then be encoded in, say, EBCDIC. While it is
      > > possible to conceive of doing such a thing, I question if his
      > > interpretation is valid.
      >
      > No, that is a wild misreading of the RFC. The JSON text must be
      > represented in Unicode, and the preferred encoding is UTF-8.
      >
      > > 1) Must a conformant JSON parser recognize all legal encodings? Or
      > > can a parser be conformant with documented restrictions on what
      > > encodings it can accept?
      >
      > Parties can agree on what is acceptable and meaningful. For example,
      > it is reasonable for a receiver to put limits on message length or
      > string length or nesting depth.
      >
      > > 2) Is a conformant JSON generator allowed to have options to generate
      > > text that is not quite JSON conformant? Or must it be completely
      > > limited to producing JSON legal JSON text only?
      >
      > A JSON generator may only produce valid JSON text.
      >
      >
      >


      [Non-text portions of this message have been removed]
    • Show all 8 messages in this topic