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

ASF GitHub Bot commented on NIFI-969:
-------------------------------------

Github user mattyb149 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1179#discussion_r87230748
  
    --- Diff: 
nifi-nar-bundles/nifi-avro-bundle/nifi-avro-processors/src/test/java/org/apache/nifi/processors/avro/TestConvertAvroToJSON.java
 ---
    @@ -239,6 +239,37 @@ public void 
testSingleSchemalessAvroMessage_wrapSingleMessage_noContainer() thro
         }
     
         @Test
    +    public void 
testSingleSchemalessAvroMessage_wrapSingleMessage_noContainer_StandardJson() 
throws IOException {
    --- End diff --
    
    The test method name says StandardJson but the USE_AVRO_JSON property is 
set to true in the test


> Add option to use standard JSON or Avro-JSON to ConvertAvroToJSON
> -----------------------------------------------------------------
>
>                 Key: NIFI-969
>                 URL: https://issues.apache.org/jira/browse/NIFI-969
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 0.3.0
>            Reporter: Ryan Blue
>            Assignee: Oleg Zhurakousky
>
> ConvertAvroToJSON uses {{GenericData#toString(GenericRecord)}} to convert to 
> JSON. This produces 
> [Avro-JSON|https://avro.apache.org/docs/1.7.7/spec.html#json_encoding], which 
> probably isn't what most users want because it adds an unexpected layer for 
> Avro union types:
> bq. the union schema {{["null","string",...]}} ... would encode: the string 
> {{"a"}} as {{{"string": "a"}}} ...
> It would be good to have a conversion that doesn't add those layers as an 
> option.



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

Reply via email to