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

Re: JSON -- rfc question -- Encoding

Expand Messages
  • json_is_clever
    ... Thanks for the clarification, Douglas.
    Message 1 of 8 , Apr 14, 2007
    • 0 Attachment
      --- In json@yahoogroups.com, "Douglas Crockford" <douglas@...> wrote:

      > No, that is a wild misreading of the RFC. The JSON text must be
      > represented in Unicode, and the preferred encoding is UTF-8.

      Thanks for the clarification, Douglas.
    • Douglas Crockford
      ... No. The u notation is only required for some of the control characters.
      Message 2 of 8 , Apr 14, 2007
      • 0 Attachment
        --- In json@yahoogroups.com, "Michael Schwarz" <michael.schwarz@...>
        wrote:
        >
        > I have one more question, do I need to convert unicode characters to
        > something like "\u12345"?

        No. The \u notation is only required for some of the control characters.
      • Michael Schwarz
        Hi, currently I have only something like r, n or t, are those chars allowed? Which control chars are you talking about? Thanks a lot. Michael ... -- Best
        Message 3 of 8 , Apr 14, 2007
        • 0 Attachment
          Hi,

          currently I have only something like \r, \n or \t, are those chars
          allowed? Which control chars are you talking about? Thanks a lot.

          Michael



          On 14 Apr 2007 06:45:58 -0700, Douglas Crockford <douglas@...> wrote:
          > --- In json@yahoogroups.com, "Michael Schwarz" <michael.schwarz@...>
          > wrote:
          > >
          > > I have one more question, do I need to convert unicode characters to
          > > something like "\u12345"?
          >
          > No. The \u notation is only required for some of the control characters.
          >
          >


          --
          Best regards | Schöne Grüße
          Michael

          Microsoft MVP - Most Valuable Professional
          Microsoft MCAD - Certified Application Developer

          http://weblogs.asp.net/mschwarz/
          http://www.ajaxpro.info/

          WPF/E: http://groups.google.com/group/wpf-everywhere

          Skype: callto:schwarz-interactive
          MSN IM: passport@...
        • Douglas Crockford
          ... None of the control characters can appear in JSON strings. You can use the u convention to represent them. A few of them, such as linefeed and tab, have
          Message 4 of 8 , Apr 14, 2007
          • 0 Attachment
            --- In json@yahoogroups.com, "Michael Schwarz" <michael.schwarz@...>
            wrote:

            > currently I have only something like \r, \n or \t, are those chars
            > allowed? Which control chars are you talking about? Thanks a lot.

            None of the control characters can appear in JSON strings. You can use
            the \u convention to represent them. A few of them, such as linefeed
            and tab, have more compact representations such as \n and \t. Take
            your pick.
          Your message has been successfully submitted and would be delivered to recipients shortly.