[
https://issues.apache.org/jira/browse/AVRO-1618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14238898#comment-14238898
]
Ryan Blue commented on AVRO-1618:
---------------------------------
If I'm understanding your patch correctly, you're expecting python objects that
have already been decoded as a regular JSON object and this just translates the
avro-specific union representation?
If so, I think you're right that an alternative name would be good.
{{JsonDecoder}} sounds like it would do the JSON parsing as well, like the
binary decoder. How difficult would it be to make this into a real JsonDecoder
using the approach you have here, where there's a JSON decoding phase and then
an interpretation phase? That would certainly be easier to implement than a
full JSON decoder and would fit more easily into the API, rather than finding a
good place for a utility class.
> Allow user to "clean up" unions into more conventional dicts in json encoding
> -----------------------------------------------------------------------------
>
> Key: AVRO-1618
> URL: https://issues.apache.org/jira/browse/AVRO-1618
> Project: Avro
> Issue Type: Improvement
> Components: python
> Affects Versions: 1.7.7
> Reporter: Aaron Kimball
> Assignee: Aaron Kimball
> Attachments: avro-1618.1.patch
>
>
> In Avro's JSON encoding, unions are implemented in a tagged fashion; walking
> through this data structure is somewhat cumbersome. It would be good to have
> a way of "decoding" this tagged-union data structure into a more conventional
> dict where the union element is directly present without the tag.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)