Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2011

Go JSON reads/writes incorrect data for list<>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Go - Library
    • Patch Available

    Description

      Example to reproduce: Given a list<string> holding one "element", the following JSON data are rendered:

      "lst":[11,1,"element"]

      The expected sequence would be:

      "lst":["str",1,"element"]

      This is due to the method OutputElemListBegin(), which JSON inherits from SimpleJSON. This method writes the field type as a byte value, without passing it through TypeIdToString(), which is incorrect for JSON.


      EDIT: Similar problem appears when a "lst" should be read.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jensg Jens Geyer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: