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

Re: New JSON library

Expand Messages
  • Douglas Crockford
    ... UTF-8 is another option.
    Message 1 of 11 , Apr 21 12:41 PM
    View Source
    • 0 Attachment
      --- In json@yahoogroups.com, jonathan wallace <ninja9578@...> wrote:
      > Oh, in order to get my library posted there, I've got to convert everything to wide strings for the full range of \u utf32 characters? Hmm, not sure if I'm willing to do that since most users use std::string, and C has no wide string support at all. Oh well.


      UTF-8 is another option.
    • jonathan wallace
      UTF8 doesn t support all of the characters supported by uXXXX, four characters mean UTF16. I do currently support UTF8, but that s only u00XX. Anyway, since
      Message 2 of 11 , Apr 21 2:10 PM
      View Source
      • 0 Attachment
        UTF8 doesn't support all of the characters supported by \uXXXX, four characters mean UTF16. I do currently support UTF8, but that's only \u00XX.
        Anyway, since most users never use anything extended beyond UTF8, I am currently working on making full support an build option, which will automatically use wide characters and support full \u escaping. Should finish it up tomorrow.

        :)





        ________________________________
        From: Douglas Crockford <douglas@...>
        To: json@yahoogroups.com
        Sent: Wed, April 21, 2010 3:41:34 PM
        Subject: [json] Re: New JSON library


        --- In json@yahoogroups. com, jonathan wallace <ninja9578@. ..> wrote:
        > Oh, in order to get my library posted there, I've got to convert everything to wide strings for the full range of \u utf32 characters? Hmm, not sure if I'm willing to do that since most users use std::string, and C has no wide string support at all. Oh well.

        UTF-8 is another option.







        [Non-text portions of this message have been removed]
      • Chip Morningstar
        That s just wrong. See, e.g., http://en.wikipedia.org/wiki/UTF-8 Chip
        Message 3 of 11 , Apr 21 2:17 PM
        View Source
        • 0 Attachment
          That's just wrong. See, e.g., http://en.wikipedia.org/wiki/UTF-8

          Chip

          jonathan wallace <ninja9578@...> wrote:

          >UTF8 doesn't support all of the characters supported by \uXXXX, four characters mean UTF16. I do currently support UTF8, but that's only \u00XX.
        • jonathan wallace
          libJSON 4.0 now fully supports u escaped sequences if built using unicode. I ve added project targets for the library, test suite, and embedded test suites
          Message 4 of 11 , Apr 22 7:32 AM
          View Source
          • 0 Attachment
            libJSON 4.0 now fully supports \u escaped sequences if built using unicode. I've added project targets for the library, test suite, and embedded test suites for these. Unicode builds now use wstring and wchar_t strings to be able to fit wide UTF8 characters, where regular builds still use string and chars as most users use them.

            I also made number parsing lazy for a slight speed boost. :)

            http://sourceforge.net/projects/libjson/




            ________________________________
            From: Chip Morningstar <chip@...>
            To: json@yahoogroups.com
            Sent: Wed, April 21, 2010 5:17:39 PM
            Subject: Re: [json] Re: New JSON library


            That's just wrong. See, e.g., http://en.wikipedia.org/wiki/UTF-8

            Chip

            jonathan wallace <ninja9578@yahoo. com> wrote:

            >UTF8 doesn't support all of the characters supported by \uXXXX, four characters mean UTF16. I do currently support UTF8, but that's only \u00XX.






            [Non-text portions of this message have been removed]
          • Douglas Crockford
            ... Does it do the right thing with uD834 uDD1E ? See http://www.ietf.org/rfc/rfc4627.txt
            Message 5 of 11 , Apr 22 2:40 PM
            View Source
            • 0 Attachment
              --- In json@yahoogroups.com, jonathan wallace <ninja9578@...> wrote:
              >
              > libJSON 4.0 now fully supports \u escaped sequences if built using unicode. I've added project targets for the library, test suite, and embedded test suites for these. Unicode builds now use wstring and wchar_t strings to be able to fit wide UTF8 characters, where regular builds still use string and chars as most users use them.
              >
              > I also made number parsing lazy for a slight speed boost. :)
              >
              > http://sourceforge.net/projects/libjson/


              Does it do the right thing with "\uD834\uDD1E"? See http://www.ietf.org/rfc/rfc4627.txt
            • jonathan wallace
              ... I thought that wasn t officially part of JSON? There is no mention of it on json.org. I was aware of that, but it left me confused, how would a parser
              Message 6 of 11 , Apr 22 7:15 PM
              View Source
              • 0 Attachment
                > Does it do the right thing with "\uD834\uDD1E" ? See http://www.ietf org/rfc/rfc4627. txt

                I thought that wasn't officially part of JSON? There is no mention of it on json.org. I was aware of that, but it left me confused, how would a parser know the difference between a surrogate pair and simply two utf8 characters following each other?

                Obviously the E gives away that one, but U+64321 would be encoded as \uD950\uDF21.





                [Non-text portions of this message have been removed]
              • jonathan wallace
                libJSON now handles surrogate pairs correctly: http://sourceforge.net/projects/libjson/ There is also now a makefile in the bundle for linux
                Message 7 of 11 , May 5, 2010
                View Source
                • 0 Attachment
                  libJSON now handles surrogate pairs correctly: http://sourceforge.net/projects/libjson/
                  There is also now a makefile in the bundle for linux




                  ________________________________
                  From: Douglas Crockford <douglas@...>
                  To: json@yahoogroups.com
                  Sent: Thu, April 22, 2010 5:40:32 PM
                  Subject: [json] Re: New JSON library



                  Does it do the right thing with "\uD834\uDD1E" ? See http://www.ietf org/rfc/rfc4627. txt




                  [Non-text portions of this message have been removed]
                • Mark Joseph
                  JDX™ XPath 2.0 for XML, JSON and JsonML https://www.p6r.com/software/jdx.html# Regards, Mark Joseph, Ph.D. President P6R, Inc 408-205-0361 mark@p6r.com
                  Message 8 of 11 , Oct 11, 2010
                  View Source
                  • 0 Attachment
                    JDX™ XPath 2.0 for XML, JSON and JsonML

                    https://www.p6r.com/software/jdx.html#


                    Regards,

                    Mark Joseph, Ph.D.
                    President
                    P6R, Inc
                    408-205-0361
                    mark@...
                    Skype: markjoseph_sc
                    _____

                    From: Douglas Crockford [mailto:douglas@...]
                    To: json@yahoogroups.com
                    Sent: Thu, 22 Apr 2010 14:40:32 -0700
                    Subject: [json] Re: New JSON library






                    --- In json@yahoogroups.com, jonathan wallace <ninja9578@...> wrote:
                    >
                    > libJSON 4.0 now fully supports \u escaped sequences if built using unicode. I've added project targets for the library, test suite, and embedded test suites for these. Unicode builds now use wstring and wchar_t strings to be able to fit wide UTF8 characters, where regular builds still use string and chars as most users use them.
                    >
                    > I also made number parsing lazy for a slight speed boost. :)
                    >
                    > http://sourceforge.net/projects/libjson/

                    Does it do the right thing with "\uD834\uDD1E"? See http://www.ietf.org/rfc/rfc4627.txt




                    [Non-text portions of this message have been removed]
                  Your message has been successfully submitted and would be delivered to recipients shortly.