avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Blue (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AVRO-1291) Python library missing strict JSON encode/decoe
Date Thu, 08 Jan 2015 21:50:36 GMT

    [ https://issues.apache.org/jira/browse/AVRO-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14270091#comment-14270091

Ryan Blue commented on AVRO-1291:

Hi Sergei, sorry to keep you waiting on a review.

Could you clarify what your additions do to help me review the patch? I think that the "hinting"
referenced in the description was in reference to the way that unions are encoded in JSON:
as an object that tells you both the union branch as well as the value. Your patch uses HINTS_ALL
for to turn this on, with an additional option for Pegasus-style JSON?

The primary changes look like they are to the DatumReader/DatumWriter - why are they there
instead of in the encoder/decoder?

What are the changes to schema.py for?


> Python library missing strict JSON encode/decoe
> -----------------------------------------------
>                 Key: AVRO-1291
>                 URL: https://issues.apache.org/jira/browse/AVRO-1291
>             Project: Avro
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 1.7.7
>            Reporter: Jeremy Kahn
>         Attachments: avro.diff
> The Python Avro libraries don't actually have a proper JSON decoder or encoder, because
they don't handle the [type-hinting for unions|http://avro.apache.org/docs/current/spec.html#json_encoding]
> The Python {{avro.io}} library should provide a pair of {{StrictJsonEncoder,StrictJsonDecoder}}}
classes that correctly include (and decode) the type hints when the schema expects a union.
> Jonathan Coveney [raised this concern|http://mail-archives.apache.org/mod_mbox/avro-user/201304.mbox/%3CCAKne9Z6nkYXwb4QzPr4qNyH1o7TnL1674MspgnHuKMuD2imguQ%40mail.gmail.com%3E]
on the Avro User mailing list.

This message was sent by Atlassian JIRA

View raw message