Avro
  1. Avro
  2. AVRO-1201

GenericRecord.toString can produce invalid JSON

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2
    • Fix Version/s: 1.7.3
    • Component/s: java
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The GenericData.toString method can produce invalid JSON. The problem is that enums are printed without quotes, as in

      {"emum_field":a}

      instead of

      {"enum_field":"a"}
      1. vcs-diff4833874908267370412.patch
        17 kB
        Sharmarke Aden
      2. avro-1201.patch
        2 kB
        Sharmarke Aden
      3. avro-1201.patch
        0.7 kB
        Sharmarke Aden
      4. Avro-1201-TestCase.tar.gz
        2 kB
        Sharmarke Aden

        Issue Links

          Activity

          Doug Cutting made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Doug Cutting made changes -
          Summary CLONE - GenericRecord.toString can produce invalid JSON GenericRecord.toString can produce invalid JSON
          Doug Cutting made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Jay Kreps [ jkreps ] Sharmarke Aden [ saden1 ]
          Fix Version/s 1.7.3 [ 12323298 ]
          Resolution Fixed [ 1 ]
          Sharmarke Aden made changes -
          Attachment vcs-diff4833874908267370412.patch [ 12554558 ]
          Sharmarke Aden made changes -
          Attachment avro-1201.patch [ 12553007 ]
          Sharmarke Aden made changes -
          Attachment avro-1201.patch [ 12552858 ]
          Sharmarke Aden made changes -
          Attachment Avro-1201-TestCase.tar.gz [ 12552854 ]
          Sharmarke Aden made changes -
          Fix Version/s 1.5.0 [ 12315282 ]
          Sharmarke Aden made changes -
          Affects Version/s 1.7.2 [ 12322476 ]
          Affects Version/s 1.4.1 [ 12315281 ]
          Sharmarke Aden made changes -
          Field Original Value New Value
          Link This issue is a clone of AVRO-713 [ AVRO-713 ]
          Sharmarke Aden created issue -

            People

            • Assignee:
              Sharmarke Aden
              Reporter:
              Sharmarke Aden
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development