<?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 Sending JSON data to JSON FILE ! in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Sending-JSON-data-to-JSON-FILE/m-p/2278977#M54285</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;I dont know why my posts are being deleted. This is the third time I am putting this post on this board in the past three days. Any quick response by today will help a lot!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;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 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; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I really look forward to a reply due to a certain deadline!&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:53:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T06:53:38Z</dc:date>
    <item>
      <title>Sending JSON data to JSON FILE !</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sending-JSON-data-to-JSON-FILE/m-p/2278977#M54285</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;I dont know why my posts are being deleted. This is the third time I am putting this post on this board in the past three days. Any quick response by today will help a lot!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;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 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; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I really look forward to a reply due to a certain deadline!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:53:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sending-JSON-data-to-JSON-FILE/m-p/2278977#M54285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T06:53:38Z</dc:date>
    </item>
  </channel>
</rss>

