Daniel Stieglitz created NIFI-12404:
---------------------------------------

             Summary: YamlTreeReader does not support Yaml aliases
                 Key: NIFI-12404
                 URL: https://issues.apache.org/jira/browse/NIFI-12404
             Project: Apache NiFi
          Issue Type: Bug
            Reporter: Daniel Stieglitz
            Assignee: Daniel Stieglitz


Utilizing the Jackson library to parse YAML allowed for reuse of much of the 
code used by the JsonTreeReader. A side effect though is Jackson does not 
support the use of Yaml anchors and aliases. An example would be the following 
Yaml

 
{code:java}
bill-to:  &id001
    street: |
            123 Tornado Alley
            Suite 16
    city:   East Centerville
    state:  KS
ship-to:  *id001
{code}
 

transformed to JSON would like
{code:java}
[ {
  "bill-to" : {
    "street" : "123 Tornado Alley\nSuite 16\n",
    "city" : "East Centerville",
    "state" : "KS"
  },
  "ship-to" : "id001"
} ]{code}
 

Note how the "ship-to" does not contain the same value as "bill-to" but rather 
a string with the name of the alias.

This is a known bug in Jackson as seen 
[here|https://github.com/FasterXML/jackson-dataformats-text/issues/98]

The aim of this ticket is to add to the YamlTreeReader documentation the fact 
that Yaml aliases are not resolved.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to