You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Daniel Stieglitz (Jira)" <ji...@apache.org> on 2023/12/15 18:05:00 UTC

[jira] [Created] (NIFI-12517) Nifi Expression Language isJson and AttributesToJSON does not consider an attribute with leading and training spaces to have JSON

Daniel Stieglitz created NIFI-12517:
---------------------------------------

             Summary: Nifi Expression Language isJson and AttributesToJSON does not consider an attribute with leading and training spaces to have JSON
                 Key: NIFI-12517
                 URL: https://issues.apache.org/jira/browse/NIFI-12517
             Project: Apache NiFi
          Issue Type: Bug
            Reporter: Daniel Stieglitz
            Assignee: Daniel Stieglitz


If there is an attribute which has embedded JSON but it has leading and and trailing spaces e.g.
{code:java}
"\n{\"name\":\"John\", \"age\":30, \"car\":null}\n"{code}
the NIFI Expression Language isJson method does consider it JSON and the AttributesToJSON processor when the JsonHandlingStrategy is NESTED does not consider it JSON. This is contrary to Jackson's ObjectMapper behavior which will parse the above example as a map.



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