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

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

GitHub user yjhyjhyjh0 opened a pull request:

    https://github.com/apache/nifi/pull/2538

    NIFI-4962 FlattenJson processor add unexpected backslash after flatten

    Upgrade json flatten library version to newest one to deal with 
StringEscapePolicy.
    Add unit test code to verify solution.
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [x] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/yjhyjhyjh0/nifi NIFI-4962

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2538.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2538
    
----
commit b6215f866e93d4065277a8e763bfa9127be972ed
Author: Deon Huang <yjhyjhyjh0@...>
Date:   2018-03-13T16:04:29Z

    NIFI-4962 FlattenJson processor add unexpected backslash after flatten

----


> FlattenJson processor add unexpected backslash after flatten
> ------------------------------------------------------------
>
>                 Key: NIFI-4962
>                 URL: https://issues.apache.org/jira/browse/NIFI-4962
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.5.0
>            Reporter: Deon Huang
>            Assignee: Deon Huang
>            Priority: Minor
>             Fix For: 1.6.0
>
>         Attachments: 34BFD277-F8FA-4ACE-BE1F-536B0BD6D10A.png, 
> 35E5F7FD-DD79-4556-8BF0-021EEF948520.png, 
> CEECDC79-7CA2-468C-A057-7A3264EB46BB.png
>
>
> Flatten Json will unexpectedly prefix slash with a backslash.
> This cause data miss match problem after flatten when json value contains url 
> or other slash character.
> Detail example are in the attachments.
>  
> Input, output example
> {"col3":["http://localhost:8080/nifi31","http://localhost:8080/nifi32"]}
> after flatten-
> {"col3":["http:\/\/localhost:8080\/nifi31","http:\/\/localhost:8080\/nifi32"]}



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

Reply via email to