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

csharp PrimitiveSchema loses custom properties in WriteJson/ToString

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 1.7.7
    • 1.9.0
    • csharp
    • None

    Description

      PrimitiveSchema class overrides WriteJson method to handle a shotrcut where primitive type is given as a literal, but in doing so it ignores teh case where there are custom properties attached to it.
      This breaks any functionality which relies on the equality of the schema re-parsed from its ToString/WriteJson output, one example being csharp codegen.

      Example:

      { "type": "string", "logicalType":"DateTimeInstant", "logicalEncoding":"ISO8601-datetime-offset" }

      becomes "type" : "string"

      Attachments

        Activity

          People

            dk-apache Dmitry Kovalev
            dk-apache Dmitry Kovalev
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: