<?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 Routine and JSON libraries in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Routine-and-JSON-libraries/m-p/2341624#M109562</link>
    <description>&lt;P&gt;Hi Everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two questions regarding JSON and libraries/imports.&lt;/P&gt;&lt;P&gt;I need to create a routine based on the existing tJavaFlex java code but I can't find out which library should I add to my new routine (by Edit Routine Libraries option).&lt;/P&gt;&lt;P&gt;The logic in tFlexJava is quite complicated so I don't want to choose different library (classes) in my new routine by mistake.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How to find out which library is used when I call below statements in tJavaFlex component (there are no any imports in Advanced settings; no tLibraryLoad component in the job)?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt; JSONArray array = new JSONArray(jsonString);&lt;/P&gt;&lt;P&gt; ... &lt;/P&gt;&lt;P&gt;JSONObject object = new JSONObject(); &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I even built a job and I checked what are the files in \lib directory but there are a lot of them (~70 files, eg. json-io-4.13.1-TALEND.jar, json-smart-2.4.7.jar,jackson-core-2.13.4.jar,jackson-core-2.13.4.jar,jackson-databind-2.13.4.2.jar).&lt;/P&gt;&lt;P&gt;And to be honest I am not sure if these are all json libraries uses by my talend job.&lt;/P&gt;&lt;P&gt;Especially when I look at the some failures in Talend Studio during execution, eg.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;routines.system.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]&lt;/P&gt;&lt;P&gt;	at routines.system.JSONTokener.syntaxError(JSONObject.java:1819)&lt;/P&gt;&lt;P&gt;	at routines.system.JSONObject.&amp;lt;init&amp;gt;(JSONObject.java:166)&lt;/P&gt;&lt;P&gt;	at routines.system.JSONObject.&amp;lt;init&amp;gt;(JSONObject.java:308)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.Once I know which library should I import to my new routine, is there any better way to force routine to use a particular library than using Edit Routine Libraries option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without importing I receive error&amp;nbsp;"JSONObject/JSONArray cannot be resolved".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;Jack Strong&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2023 12:02:17 GMT</pubDate>
    <dc:creator>JackStrong</dc:creator>
    <dc:date>2023-04-21T12:02:17Z</dc:date>
    <item>
      <title>Routine and JSON libraries</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Routine-and-JSON-libraries/m-p/2341624#M109562</link>
      <description>&lt;P&gt;Hi Everyone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two questions regarding JSON and libraries/imports.&lt;/P&gt;&lt;P&gt;I need to create a routine based on the existing tJavaFlex java code but I can't find out which library should I add to my new routine (by Edit Routine Libraries option).&lt;/P&gt;&lt;P&gt;The logic in tFlexJava is quite complicated so I don't want to choose different library (classes) in my new routine by mistake.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How to find out which library is used when I call below statements in tJavaFlex component (there are no any imports in Advanced settings; no tLibraryLoad component in the job)?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt; JSONArray array = new JSONArray(jsonString);&lt;/P&gt;&lt;P&gt; ... &lt;/P&gt;&lt;P&gt;JSONObject object = new JSONObject(); &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I even built a job and I checked what are the files in \lib directory but there are a lot of them (~70 files, eg. json-io-4.13.1-TALEND.jar, json-smart-2.4.7.jar,jackson-core-2.13.4.jar,jackson-core-2.13.4.jar,jackson-databind-2.13.4.2.jar).&lt;/P&gt;&lt;P&gt;And to be honest I am not sure if these are all json libraries uses by my talend job.&lt;/P&gt;&lt;P&gt;Especially when I look at the some failures in Talend Studio during execution, eg.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;routines.system.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]&lt;/P&gt;&lt;P&gt;	at routines.system.JSONTokener.syntaxError(JSONObject.java:1819)&lt;/P&gt;&lt;P&gt;	at routines.system.JSONObject.&amp;lt;init&amp;gt;(JSONObject.java:166)&lt;/P&gt;&lt;P&gt;	at routines.system.JSONObject.&amp;lt;init&amp;gt;(JSONObject.java:308)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.Once I know which library should I import to my new routine, is there any better way to force routine to use a particular library than using Edit Routine Libraries option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without importing I receive error&amp;nbsp;"JSONObject/JSONArray cannot be resolved".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;Jack Strong&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 12:02:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Routine-and-JSON-libraries/m-p/2341624#M109562</guid>
      <dc:creator>JackStrong</dc:creator>
      <dc:date>2023-04-21T12:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Routine and JSON libraries</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Routine-and-JSON-libraries/m-p/2341625#M109563</link>
      <description>&lt;P&gt;Hello @Michal Swiniarski​&amp;nbsp;,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt; it will use the system built-in &lt;B&gt;routines.jar&lt;/B&gt; while calling the JSONObject statements in tJavaFlex component as the below&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt; &lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000fKsvFAAS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156278iD55DFE9ADFC1B4BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000fKsvFAAS.png" alt="0695b00000fKsvFAAS.png" /&gt;&lt;/span&gt; 2. The only way to use a particular library for the routine is to use Edit Routine Libraries option&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Aiming&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 01:16:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Routine-and-JSON-libraries/m-p/2341625#M109563</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-24T01:16:29Z</dc:date>
    </item>
  </channel>
</rss>

