Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1191

C++ json encoder uses \U instead of \u

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.9.0
    • c++
    • None

    Description

      From the JSON spec http://www.ietf.org/rfc/rfc4627.txt:

      2.5. Strings

      The representation of strings is similar to conventions used in the C
      family of programming languages. A string begins and ends with
      quotation marks. All Unicode characters may be placed within the
      quotation marks except for the characters that must be escaped:
      quotation mark, reverse solidus, and the control characters (U+0000
      through U+001F).

      Any character may be escaped. If the character is in the Basic
      Multilingual Plane (U+0000 through U+FFFF), then it may be
      represented as a six-character sequence: a reverse solidus, followed
      by the lowercase letter u, followed by four hexadecimal digits that
      encode the character's code point. The hexadecimal letters A though
      F can be upper or lowercase. So, for example, a string containing
      only a single reverse solidus character may be represented as
      "\u005C".

      But JsonCodec.cc outputs \U

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kehli Keh-Li Sheng
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: