You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2018/05/01 17:48:00 UTC

[jira] [Commented] (AVRO-1294) XML Encoder/Decoder implementations?

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

Doug Cutting commented on AVRO-1294:
------------------------------------

This would be great to have.

You could use XMLEventReader and XMLEventWriter to implement an Avro Decoder & Encoder.  If you us JsonEncoder and JsonDecoder implementations as examples, then you'd also get the benefit of Avro's parser framework for schema validation and resolution.  Where JsonEncoder maps JsonToken events to Avro parser Symbols, you'd instead map XMLEvents.

How should the XML look, something like:
{code:java}
<avro:record name="Foo" namespace="com.yoyodyne">
  <avro:field name="x">
    <avro:int>10</avro:int>
  </avro:field>
</avro:record>{code}
or something like:
{code:java}
<Foo>
  <x>10</x>
</Foo>{code}
?

 

> XML Encoder/Decoder implementations?
> ------------------------------------
>
>                 Key: AVRO-1294
>                 URL: https://issues.apache.org/jira/browse/AVRO-1294
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Brian Kent
>            Priority: Minor
>
> Are there any plans to support XML Encoder/Decoder implementations?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)