<?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: Passing json to tJava in Talend Data Catalog</title>
    <link>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2533417#M2407</link>
    <description>&lt;P&gt;I'm glad you got it working! I have corrected the article link, thanks for pointing it out.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Oct 2025 00:03:16 GMT</pubDate>
    <dc:creator>Shicong_Hong</dc:creator>
    <dc:date>2025-10-15T00:03:16Z</dc:date>
    <item>
      <title>Passing json to tJava</title>
      <link>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2532643#M2404</link>
      <description>&lt;P&gt;I have a valid chunk of json from a tMap and the chunk is named "children."&amp;nbsp; I am trying to pass that into a tJava component.&amp;nbsp; The job won't even compile.&amp;nbsp; I get the error...&lt;/P&gt;&lt;P&gt;"Type mismatch: cannot convert from JSONArray to childrenStruct."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;JSONObject currentNode = (JSONObject) globalMap.get("children");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;JSONArray children = new JSONArray();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Stack&amp;lt;JSONArray&amp;gt; stack = new Stack&amp;lt;&amp;gt;();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;if (currentNode.has("relationshipList")) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;stack.push(currentNode.getJSONArray("relationshipList"));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;while (!stack.isEmpty()) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;JSONArray list = stack.pop();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;for (int i=0; i&amp;lt;list.length(); i++) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;JSONObject currentChildNode = list.getJSONObject(i);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if (currentChildNode.has("unit")) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;JSONObject unit = currentChildNode.getJSONObject("unit");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if(currentChildNode.has("parentID")) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;unit.put("parentID", currentChildNode.getString("parentID"));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if(currentChildNode.has("level")) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;unit.put("level", currentChildNode.getString("level"));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;children.put(unit);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if(currentChildNode.has("relationshipList")){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;stack.push(currentChildNode.getJSONArray("relationshipList"));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;globalMap.put("allSubordinates", children);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;JSONArray retrievedList = (JSONArray) globalMap.get("allSubordinates");&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 17:20:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2532643#M2404</guid>
      <dc:creator>pthomas</dc:creator>
      <dc:date>2025-10-06T17:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Passing json to tJava</title>
      <link>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2533046#M2405</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/321951"&gt;@pthomas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check this article&amp;nbsp;&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/What-is-the-difference-between-tJava-tJavaRow-and-tJavaFlex/ta-p/2151892" target="_blank"&gt;https://community.qlik.com/t5/Official-Support-Articles/What-is-the-difference-between-tJava-tJavaRow-and-tJavaFlex/ta-p/2151892&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I think you should use tJavaRow instead of tJava component in this case.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Shicong&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 00:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2533046#M2405</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2025-10-15T00:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Passing json to tJava</title>
      <link>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2533409#M2406</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/257838"&gt;@Shicong_Hong&lt;/a&gt;&amp;nbsp;- tJavaRow worked.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can't get to the article in your link though.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 17:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2533409#M2406</guid>
      <dc:creator>pthomas</dc:creator>
      <dc:date>2025-10-14T17:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Passing json to tJava</title>
      <link>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2533417#M2407</link>
      <description>&lt;P&gt;I'm glad you got it working! I have corrected the article link, thanks for pointing it out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 00:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Data-Catalog/Passing-json-to-tJava/m-p/2533417#M2407</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2025-10-15T00:03:16Z</dc:date>
    </item>
  </channel>
</rss>

