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

AvroAsTextInput format creates invalid JSON for NaN values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.5
    • 1.7.7
    • java
    • None

    Description

      The AvroAsTextInput format generates a record containing

      [omitted] , "someName": NaN}

      A json parser chokes on that and it is not legal JSON AFAIK. In related issues AVRO-972 and AVRO-1290 it is resolved, for lack of a better option, to map the value NaN to the string "NaN", which needs to be quoted in JSON. Our parser can handle that with no modifications, Java will parse such a string to the correct value using standard libraries.

      Attachments

        1. AVRO-1454.patch
          3 kB
          Doug Cutting
        2. AVRO-1454.patch
          3 kB
          Doug Cutting
        3. AVRO-1454.patch
          2 kB
          Doug Cutting

        Activity

          People

            cutting Doug Cutting
            piccolbo Antonio Piccolboni
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: