<?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 Streaming data to JSON File! in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Streaming-data-to-JSON-File/m-p/2277089#M52973</link>
    <description>&lt;P&gt;Hello, so I am streaming some json data into a txt file. I later read the data from the text file using a tFileInputJSON in order to read only&amp;nbsp;all the json objects inside a json array which is inside a json object and I pass this to a tFileOutputJSON. This process works however when I do so, I get some special character for "/". That is when a string contains "/" in the json data that is being streamed into the text, when I read the json data from the tFileOutputJson, i get "\/". How can I fix this?!!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is a better illustration:&lt;/P&gt; 
&lt;P&gt;The data streaming in is of the form:&lt;/P&gt; 
&lt;P&gt;{&lt;/P&gt; 
&lt;P&gt;"r": {&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"s": [&amp;nbsp;{"Level":3,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "url": "&lt;A href="https://google.com/" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;https://google.com&lt;/A&gt;",&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "text": "hello world",&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "Class": 3&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }]&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; }&lt;/P&gt; 
&lt;P&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Essentially I only want the data inside the json array "s". So, in my&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;tFileInputJSON, I read the text file which the json data was streamed to and I run the Loop json query as: "$.r.s[*]"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;and I am able to get the required data and send it to tFileOutputJson. However, when I look at the text in tFileOutputJson, I get the following:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;[&amp;nbsp;{"Level":3,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;"url": "https:\/\/google.com",&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; "text": "hello world",&lt;/P&gt; 
&lt;P&gt;},&lt;/P&gt; 
&lt;P&gt;{....&lt;/P&gt; 
&lt;P&gt;}]&lt;/P&gt; 
&lt;P&gt;So if looking at the url value, I get "\/\/" instead of "//". How can I fix this?!! and why is this happening?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Also if you look at the json data I am trying to stream in, there is key named: "Class" that I also want to take in. I defined it in my schema when linking the tFileInputJson to tFileOutputJson, however, I get an error saying "Class" is a reserved Java keyword. Then, how can I pass the "Class": into my tFileOutputJson?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jan 2019 16:13:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-01-08T16:13:09Z</dc:date>
    <item>
      <title>Streaming data to JSON File!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Streaming-data-to-JSON-File/m-p/2277089#M52973</link>
      <description>&lt;P&gt;Hello, so I am streaming some json data into a txt file. I later read the data from the text file using a tFileInputJSON in order to read only&amp;nbsp;all the json objects inside a json array which is inside a json object and I pass this to a tFileOutputJSON. This process works however when I do so, I get some special character for "/". That is when a string contains "/" in the json data that is being streamed into the text, when I read the json data from the tFileOutputJson, i get "\/". How can I fix this?!!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is a better illustration:&lt;/P&gt; 
&lt;P&gt;The data streaming in is of the form:&lt;/P&gt; 
&lt;P&gt;{&lt;/P&gt; 
&lt;P&gt;"r": {&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"s": [&amp;nbsp;{"Level":3,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "url": "&lt;A href="https://google.com/" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer"&gt;https://google.com&lt;/A&gt;",&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "text": "hello world",&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "Class": 3&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }]&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; }&lt;/P&gt; 
&lt;P&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Essentially I only want the data inside the json array "s". So, in my&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;tFileInputJSON, I read the text file which the json data was streamed to and I run the Loop json query as: "$.r.s[*]"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;and I am able to get the required data and send it to tFileOutputJson. However, when I look at the text in tFileOutputJson, I get the following:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;[&amp;nbsp;{"Level":3,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;"url": "https:\/\/google.com",&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; "text": "hello world",&lt;/P&gt; 
&lt;P&gt;},&lt;/P&gt; 
&lt;P&gt;{....&lt;/P&gt; 
&lt;P&gt;}]&lt;/P&gt; 
&lt;P&gt;So if looking at the url value, I get "\/\/" instead of "//". How can I fix this?!! and why is this happening?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Also if you look at the json data I am trying to stream in, there is key named: "Class" that I also want to take in. I defined it in my schema when linking the tFileInputJson to tFileOutputJson, however, I get an error saying "Class" is a reserved Java keyword. Then, how can I pass the "Class": into my tFileOutputJson?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 16:13:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Streaming-data-to-JSON-File/m-p/2277089#M52973</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-08T16:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Streaming data to JSON File!</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Streaming-data-to-JSON-File/m-p/2277090#M52974</link>
      <description>&lt;P&gt;Hi sai06kiran&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I read the input data and print the URL on the console, I can see the value is right. Can you use a tLogRow after tFileInputJson to see if the value is extracted correctly?&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 509px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1vQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133164i39AB2EF3613970EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1vQ.png" alt="0683p000009M1vQ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Talend Studio is a Java code generator, class is a&amp;nbsp;reserved word in Java, so it can not be a column name.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 08:25:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Streaming-data-to-JSON-File/m-p/2277090#M52974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-14T08:25:02Z</dc:date>
    </item>
  </channel>
</rss>

