<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: array response is having escape character in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239291#M201102</link>
    <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I had done the same in my case with some minor modifications.&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2019 23:57:54 GMT</pubDate>
    <dc:creator>negiraj1989</dc:creator>
    <dc:date>2019-05-02T23:57:54Z</dc:date>
    <item>
      <title>array response is having escape character</title>
      <link>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239287#M201098</link>
      <description>&lt;P&gt;I fetched the data from hbase using fetchHbaseRow and the response is in json format. but the value for the attribute is array of objects and it is having escaped characters in there.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;A sample response is posted below:&lt;BR /&gt;&lt;BR /&gt;{"someValues":"[{\"a\":\"6f7f8ffe-4837-4fc1-a5b9-45bc35727b69\",\"b\":\"da_states\",\"doc\":\"unknown\",\"idNew\":\"2846e8e1-5b17-490c-a99e-df1f1e3fa009\",\"status\":\"Approved\",\"scope\":\"Global\",\"dateModified\":\"2019-04-19T11:26:02Z\"}]"}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I need to split the objects in array and because of escape characters I am not able to.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/641/mburgess.html" nodeid="641" target="_blank"&gt;@Matt Burgess&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:21:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239287#M201098</guid>
      <dc:creator>negiraj1989</dc:creator>
      <dc:date>2022-09-16T14:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: array response is having escape character</title>
      <link>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239288#M201099</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/113149/negiraj1989.html" nodeid="113149" target="_blank"&gt;@Raj Negi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After &lt;STRONG&gt;FetchHbaseRow&lt;/STRONG&gt; processor use &lt;STRONG&gt;ReplaceText&lt;/STRONG&gt; processor with below configs:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="108329-screen-shot-2019-04-30-at-70220-pm.png" style="width: 1276px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/13963iC318E6E793D47759/image-size/medium?v=v2&amp;amp;px=400" role="button" title="108329-screen-shot-2019-04-30-at-70220-pm.png" alt="108329-screen-shot-2019-04-30-at-70220-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Search Value&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;PRE&gt;(?s)(^.*$)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Replacement Value&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;PRE&gt;${'$1':unescapeJson()} &lt;/PRE&gt;&lt;P&gt;//capture all the data and apply nifi expression language unescapeJson function.&lt;/P&gt;&lt;P&gt;Character Set&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;PRE&gt;UTF-8&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Maximum Buffer Size&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;PRE&gt;1 MB //change as per your flowfile size&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Replacement Strategy&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;PRE&gt;Regex Replace&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Evaluation Mode&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;PRE&gt;Entire text&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Flow:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;1.FetchHbaseRow
2.ReplaceText
--other processors&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 22:42:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239288#M201099</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-17T22:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: array response is having escape character</title>
      <link>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239289#M201100</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;.&lt;BR /&gt;But this does not solve my problem. It does remove the \ from the json but the response is still not in the json response.&lt;/P&gt;&lt;P&gt;{"someValue":"[{"id":"6f7f8ffe-4837-4fc1-a5b9-45bc35727b69","name":"da_st","doc":"unknown","pnId":"2846e8e1-5b17-490c-a99e-df1f1e3fa009","status":"Approved","scope":"Global","dateModified":"2019-04-19T11:26:02Z"},{"id":"3559741f-76f6-4fb4-b919-6def5e0511fe","name":"Het","doc":"unknown","pnId":"2846e8e1-5b17-490c-a99e-df1f1e3fa009","status":"Approved","scope":"Global","dateModified":"2019-04-19T11:26:00Z"},{"id":"3b66fbda-9a16-48ac-9fd0-122e3826ef80","name":"queue","doc":"unknown","pnId":"2846e8e1-5b17-490c-a99e-df1f1e3fa009","status":"Approved","scope":"Global","dateModified":"2019-04-19T11:26:01Z"}]"}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The response should have been :&lt;/P&gt;&lt;P&gt;{"someValue":[{"id":"6f7f8ffe-4837-4fc1-a5b9-45bc35727b69","name":"da_st","doc":"unknown","pnId":"2846e8e1-5b17-490c-a99e-df1f1e3fa009","status":"Approved","scope":"Global","dateModified":"2019-04-19T11:26:02Z"},{"id":"3559741f-76f6-4fb4-b919-6def5e0511fe","name":"Het","doc":"unknown","pnId":"2846e8e1-5b17-490c-a99e-df1f1e3fa009","status":"Approved","scope":"Global","dateModified":"2019-04-19T11:26:00Z"},{"id":"3b66fbda-9a16-48ac-9fd0-122e3826ef80","name":"queue","doc":"unknown","pnId":"2846e8e1-5b17-490c-a99e-df1f1e3fa009","status":"Approved","scope":"Global","dateModified":"2019-04-19T11:26:01Z"}]} &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The quotes should not be present before and after the array brackets([]).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 03:33:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239289#M201100</guid>
      <dc:creator>negiraj1989</dc:creator>
      <dc:date>2019-05-02T03:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: array response is having escape character</title>
      <link>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239290#M201101</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/113149/negiraj1989.html" nodeid="113149"&gt;@Raj Negi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;nifi expression language&lt;/STRONG&gt; to replace function to replace  &lt;STRONG&gt;"[ and ]" with [ and ]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;${'$1':unescapeJson():replace('"[','['):replace(']"',']')} &lt;/PRE&gt;</description>
      <pubDate>Thu, 02 May 2019 07:27:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239290#M201101</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-05-02T07:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: array response is having escape character</title>
      <link>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239291#M201102</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I had done the same in my case with some minor modifications.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 23:57:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/array-response-is-having-escape-character/m-p/239291#M201102</guid>
      <dc:creator>negiraj1989</dc:creator>
      <dc:date>2019-05-02T23:57:54Z</dc:date>
    </item>
  </channel>
</rss>

