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

Sean Busbey commented on NIFI-844:
----------------------------------

sorry, got buried in HBase licensing again. It might be better to rework this 
as converting between arbitrary avro encodings.

Avro has multiple encodings and the ticket doesn't specify which you're 
planning to deal with. From looking at the patch, I think your current 
intention is to read from [the binary 
encoding|http://avro.apache.org/docs/current/spec.html#binary_encoding]. 
There's also a [json encoding that is 
round-trippable|http://avro.apache.org/docs/current/spec.html#json_encoding] 
(that is, it doesn't lose any information).

Relying on toString to get a JSON representation is dangerous, because the API 
doesn't actually guarantee that the result of toString will be JSON (it doesn't 
say anything at all). Also, the JSON it creates loses information so it isn't 
possible to get back to the original binary version in all cases.

The main issue folks have with the "Avro JSON encoding" is that it is ... very 
verbose. There's a proposed new encoder that looks like what you're probably 
expecting (see AVRO-1582). We could get that in to Avro with a bit of work.

> Create Processor to convert Avro to JSON
> ----------------------------------------
>
>                 Key: NIFI-844
>                 URL: https://issues.apache.org/jira/browse/NIFI-844
>             Project: Apache NiFi
>          Issue Type: Task
>          Components: Extensions
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 0.3.0
>
>         Attachments: 
> 0001-NIFI-844-Initial-import-of-ConvertAvroToJSON-process.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to