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

Better Json serialization for Avro decimal logical types?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • java
    • None

    Description

      Currently as I understand decimal logical types are encoded on top of bytes and fixed avro types. This makes them a bit "unnatural" in the json encoding...

      I worked around a hack in my fork to naturally encode them into json decimals. A good starting point to look at is in: https://github.com/zolyfarkas/avro/blob/trunk/lang/java/avro/src/main/java/org/apache/avro/io/DecimalEncoder.java

      My approach is a bit hacky, so I would be interested in suggestions to have this closer to something we can integrate into avro...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zolyfarkas Zoltan Farkas
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated: