<?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: Parsing Json in Talend? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202137#M3948</link>
    <description>Thx for reading. 
&lt;BR /&gt;Here is my json example : 
&lt;BR /&gt; 
&lt;PRE&gt;{&lt;BR /&gt;	"RawListDigest":" Test - 2001",&lt;BR /&gt;	"Type":"Book",&lt;BR /&gt;	"Title":"Book Test",&lt;BR /&gt;	"Contributor":&lt;BR /&gt;	{&lt;BR /&gt;		"Authors":&lt;BR /&gt;		,&lt;BR /&gt;		"Editor":&lt;BR /&gt;	},&lt;BR /&gt;	"Topic":"Some topic",&lt;BR /&gt;	"Attributes":&lt;BR /&gt;	,&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;And i wanted to have something like 
&lt;BR /&gt; 
&lt;PRE&gt;BookID|Type|Attribute - Collection (if AttributeKey == "A001")&lt;/PRE&gt; 
&lt;BR /&gt;So, my final file could like : 
&lt;BR /&gt; 
&lt;PRE&gt;15648|Book|TestCollection&lt;BR /&gt;15649|Book|Collection2&lt;BR /&gt;15650|Book|TestCollection&lt;BR /&gt;16697|Book|My Collection&lt;/PRE&gt; 
&lt;BR /&gt;I get the "BookID" value from a file containing all my book id. Then i make a request via URL to get an XML for eache book id. 
&lt;BR /&gt;That XML contain my json Data (actually i managed to isolate that data thanx to XPath 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; ). 
&lt;BR /&gt;And voila ^^ 
&lt;BR /&gt;Tell me if i missed something ^^.</description>
    <pubDate>Thu, 28 Jun 2012 08:28:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-28T08:28:32Z</dc:date>
    <item>
      <title>Parsing Json in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202135#M3946</link>
      <description>Hey! 
&lt;BR /&gt;I've got problems with talend using json. 
&lt;BR /&gt;I have a file containing 2 cols : 
&lt;BR /&gt;I just want to exract some precise data from that json without losing my ID. So i could make a new file like : (and so on) 
&lt;BR /&gt;I attempted to use a tFileInputJSON. I had to separate my from my in order to do so but i couldn't mix those data again with a tMap for example. 
&lt;BR /&gt;So instead, i manage to use a tJavaRow. This way i can keep all my previous cols and treat my JSON string easier. BUT, i can't get this thing to work properly. 
&lt;BR /&gt;Here is my code : 
&lt;BR /&gt; 
&lt;PRE&gt;JSONObject json = new JSONObject(input_row.jsonCol);&lt;BR /&gt;JSONArray jsonMainArr = json.getJSONArray("Att");&lt;BR /&gt;System.out.println(jsonMainArr.toString());&lt;/PRE&gt; 
&lt;BR /&gt;And i get an error saying to me that JSONArray is not visible. 
&lt;BR /&gt;So i thought that i forgot to "import" something so i added : 
&lt;BR /&gt; 
&lt;PRE&gt;import org.json.simple.JSONArray;&lt;/PRE&gt; 
&lt;BR /&gt;It can't find it &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 
&lt;BR /&gt;When i try to look in "outines.system" i can only find a "JSONObject"... 
&lt;BR /&gt;I did not wanted to use a tExtractRegexFields... 
&lt;BR /&gt;So what should i do? any clue?</description>
      <pubDate>Wed, 27 Jun 2012 16:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202135#M3946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-27T16:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Json in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202136#M3947</link>
      <description>Hi&lt;BR /&gt;Welcome to Talend Community!&lt;BR /&gt;Could you show us the data of your JSON file and the expected result?&lt;BR /&gt;Maybe we could create a job and get the result in a Talend way.&lt;BR /&gt;I think there is no need to code in tJavaRow. It shouldn't be so complex.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Thu, 28 Jun 2012 06:49:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202136#M3947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-28T06:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Json in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202137#M3948</link>
      <description>Thx for reading. 
&lt;BR /&gt;Here is my json example : 
&lt;BR /&gt; 
&lt;PRE&gt;{&lt;BR /&gt;	"RawListDigest":" Test - 2001",&lt;BR /&gt;	"Type":"Book",&lt;BR /&gt;	"Title":"Book Test",&lt;BR /&gt;	"Contributor":&lt;BR /&gt;	{&lt;BR /&gt;		"Authors":&lt;BR /&gt;		,&lt;BR /&gt;		"Editor":&lt;BR /&gt;	},&lt;BR /&gt;	"Topic":"Some topic",&lt;BR /&gt;	"Attributes":&lt;BR /&gt;	,&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;And i wanted to have something like 
&lt;BR /&gt; 
&lt;PRE&gt;BookID|Type|Attribute - Collection (if AttributeKey == "A001")&lt;/PRE&gt; 
&lt;BR /&gt;So, my final file could like : 
&lt;BR /&gt; 
&lt;PRE&gt;15648|Book|TestCollection&lt;BR /&gt;15649|Book|Collection2&lt;BR /&gt;15650|Book|TestCollection&lt;BR /&gt;16697|Book|My Collection&lt;/PRE&gt; 
&lt;BR /&gt;I get the "BookID" value from a file containing all my book id. Then i make a request via URL to get an XML for eache book id. 
&lt;BR /&gt;That XML contain my json Data (actually i managed to isolate that data thanx to XPath 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; ). 
&lt;BR /&gt;And voila ^^ 
&lt;BR /&gt;Tell me if i missed something ^^.</description>
      <pubDate>Thu, 28 Jun 2012 08:28:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202137#M3948</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-28T08:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing Json in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202138#M3949</link>
      <description>&lt;P&gt;Hi there.&amp;nbsp;I don't know if you came right... but your could try:&lt;/P&gt;
&lt;PRE&gt; import org.json.JSONArray;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 11:59:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parsing-Json-in-Talend/m-p/2202138#M3949</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-11T11:59:08Z</dc:date>
    </item>
  </channel>
</rss>

