<?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>topic Re: How can I parse the webhook payload json data ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302397#M74385</link>
    <description>&lt;P&gt;Thanks for the answer ! But before being able to decode anything, I need to have the value first &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;&lt;P&gt;ANd "context.resource_webhook_payload" contains the json payload, but with [ ] around it. So "new JSONObject(" isn't working. How can I make it read the Json part within the [ ] ? &lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2022 13:01:43 GMT</pubDate>
    <dc:creator>François_T</dc:creator>
    <dc:date>2022-05-19T13:01:43Z</dc:date>
    <item>
      <title>How can I parse the webhook payload json data ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302394#M74382</link>
      <description>&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to read the data sent to a job using the webhook URL. I see that I'm getting the payload as a json array, where I have the "data" field containing what I need. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what I don't know how to do is : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-how can i parse this json content ? I see Json components, but based on fields or files, and I don't know how to convert my context to one of those&lt;/P&gt;&lt;P&gt;-once I will have this data value, how can I decode it ? It's a simple base64 encoding, so I guess a simple tjava or tjavarow, with the right function ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 09:50:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302394#M74382</guid>
      <dc:creator>François_T</dc:creator>
      <dc:date>2022-05-18T09:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I parse the webhook payload json data ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302395#M74383</link>
      <description>&lt;P&gt;I tried with a simple tjava component, with this code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JSONObject obj=new JSONObject(context.resource_webhook_payload);&lt;/P&gt;&lt;P&gt;context.email_requester=obj.getString("data");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but it's refusing to read the json object, as there are "[]" around it. How can I read the content ? &lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 10:18:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302395#M74383</guid>
      <dc:creator>François_T</dc:creator>
      <dc:date>2022-05-18T10:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can I parse the webhook payload json data ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302396#M74384</link>
      <description>&lt;P&gt;@François Tissandier​&amp;nbsp;, take a look at this &lt;A href="https://community.talend.com/s/question/0D55b00006soOOJCA2/decode-base64-with-tjava-component" alt="https://community.talend.com/s/question/0D55b00006soOOJCA2/decode-base64-with-tjava-component" target="_blank"&gt;topic&lt;/A&gt;, and try the code used to decode the base64 string on tJavaRow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 07:32:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302396#M74384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-19T07:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I parse the webhook payload json data ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302397#M74385</link>
      <description>&lt;P&gt;Thanks for the answer ! But before being able to decode anything, I need to have the value first &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;&lt;P&gt;ANd "context.resource_webhook_payload" contains the json payload, but with [ ] around it. So "new JSONObject(" isn't working. How can I make it read the Json part within the [ ] ? &lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 13:01:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302397#M74385</guid>
      <dc:creator>François_T</dc:creator>
      <dc:date>2022-05-19T13:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I parse the webhook payload json data ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302398#M74386</link>
      <description>&lt;P&gt;@François Tissandier​&amp;nbsp;, ​remove the [ ]&amp;nbsp;from the string using expression:&lt;/P&gt;&lt;P&gt;JSONObject obj=new JSONObject((context.resource_webhook_payload.replaceAll("[","")).replaceAll("]",""));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 00:02:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302398#M74386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-20T00:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I parse the webhook payload json data ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302399#M74387</link>
      <description>&lt;P&gt;Indeed, quite simple and it's working ! &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to decode the base64 content ? I can't find a simple way to do it in my tjava component &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 16:06:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302399#M74387</guid>
      <dc:creator>François_T</dc:creator>
      <dc:date>2022-05-23T16:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: How can I parse the webhook payload json data ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302400#M74388</link>
      <description>&lt;P&gt;if the data comes from an input component, use tJavaRow instead of tJava, as showed in the &lt;A href="https://community.talend.com/s/question/0D55b00006soOOJCA2/decode-base64-with-tjava-component" alt="https://community.talend.com/s/question/0D55b00006soOOJCA2/decode-base64-with-tjava-component" target="_blank"&gt;topic&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 03:46:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-can-I-parse-the-webhook-payload-json-data/m-p/2302400#M74388</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-24T03:46:55Z</dc:date>
    </item>
  </channel>
</rss>

