<?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: json output... almost there. i need arrays and it's creating objects in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359310#M124163</link>
    <description>Hi, 
&lt;BR /&gt;Any update on this one? I am also trying to use tXMLmap to output array of JSON objects and it is not working. I am using Talend 5.5. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Gowri</description>
    <pubDate>Tue, 26 May 2015 23:19:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-05-26T23:19:55Z</dc:date>
    <item>
      <title>json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359306#M124159</link>
      <description>newbie to TOS (5.3) familiar with json, i think the json TOS is producing is "correct", it's just my endpoint wants arrays not objects 
&lt;BR /&gt;big picture... i'm trying to read a csv, convert each record to json and call a rest api to insert. I want this... 
&lt;BR /&gt;, 
&lt;BR /&gt; "FirstName": , 
&lt;BR /&gt; "LastName": 
&lt;BR /&gt; }, 
&lt;BR /&gt; "xref": 
&lt;BR /&gt; } 
&lt;BR /&gt;] 
&lt;BR /&gt;I'm getting this 
&lt;BR /&gt;{ 
&lt;BR /&gt; "type":"conf/nodeTypes/Person", 
&lt;BR /&gt; "attributes": { 
&lt;BR /&gt; "Name": { 
&lt;BR /&gt; "type":"conf/nodeTypes/Person/attributes/Name", 
&lt;BR /&gt; "value":"DavidCole" 
&lt;BR /&gt; }, 
&lt;BR /&gt; "FirstName": { 
&lt;BR /&gt; "type":"conf/nodeTypes/Person/attributes/FirstName", 
&lt;BR /&gt; "value":"David" 
&lt;BR /&gt; }, 
&lt;BR /&gt; "LastName": { 
&lt;BR /&gt; "type":"conf/nodeTypes/Person/attributes/LastName", 
&lt;BR /&gt; "value":"Cole" 
&lt;BR /&gt; } 
&lt;BR /&gt; }, 
&lt;BR /&gt; "xref": { 
&lt;BR /&gt; "type":"conf/sources/IMD", 
&lt;BR /&gt; "value":"1", 
&lt;BR /&gt; "url":" 
&lt;A href="http://www.domainName.com" target="_blank" rel="nofollow noopener noreferrer"&gt;www.domainName.com&lt;/A&gt;" 
&lt;BR /&gt; } 
&lt;BR /&gt; } 
&lt;BR /&gt;Problems... 
&lt;BR /&gt;1. JSON is output as objects {...} not Arrays (see Name, FirstName, etc.) maybe technically that's ok, it's valid JSON, but my endpoint wants Arrays. 
&lt;BR /&gt;2. I'm not getting the surrounding brackets... I was able to use TFileOutputJSON to add brackets but 
&lt;BR /&gt; A. I don't want to go to a file 
&lt;BR /&gt; B. It does all my rows not one at a time 
&lt;BR /&gt;I tried a bunch of things but can't force an array. I posted the job stream, using viewers for debug, not very interesting. 
&lt;BR /&gt;any suggestion would be welcomed. 
&lt;BR /&gt;BTW... if someone had an example of process a record POST to REST, read response, process next... that would be helpful, i'll post a separate thread as well. 
&lt;BR /&gt;thanks for reading. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEnU.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153478iAD477B95C335FB11/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEnU.png" alt="0683p000009MEnU.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 09 Aug 2013 08:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359306#M124159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-09T08:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359307#M124160</link>
      <description>Hi 
&lt;BR /&gt;We usually use a tRestClient component to call a rest web service, and post a request with json format, you can find an example in this topic: 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCsUkCAK" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-Input-for-Rest-Body-without-Root-node-Alternative-to/td-p/57566&lt;/A&gt; 
&lt;BR /&gt;But, it don't output the json request with Arrays format on tXMLMap. 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 22 Aug 2013 03:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359307#M124160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-22T03:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359308#M124161</link>
      <description>We are working on better support for arrays in XML to JSON auto-conversion supported by tRESTClient 
&lt;BR /&gt;Cheers, Sergey</description>
      <pubDate>Thu, 26 Sep 2013 11:15:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359308#M124161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-26T11:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359309#M124162</link>
      <description>Any update on this? &amp;nbsp;It's been a couple years now and wondering if Talend has any solutions to this problem?
&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 11 May 2015 06:19:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359309#M124162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-11T06:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359310#M124163</link>
      <description>Hi, 
&lt;BR /&gt;Any update on this one? I am also trying to use tXMLmap to output array of JSON objects and it is not working. I am using Talend 5.5. 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Gowri</description>
      <pubDate>Tue, 26 May 2015 23:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359310#M124163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-26T23:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359311#M124164</link>
      <description>Any update on this? &amp;nbsp;This is a hot topic in the Talend community and it needs attention. &amp;nbsp;Any help would be greatly appreciated.</description>
      <pubDate>Mon, 01 Jun 2015 19:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359311#M124164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-01T19:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359312#M124165</link>
      <description>We are also interested in finding a solution to this.
&lt;BR /&gt;We have a data source passed to a tXMLMap component that loops object according to this structure:
&lt;BR /&gt;
&lt;PRE&gt;&amp;lt;root&amp;gt;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;&amp;lt;person name="" /&amp;gt;&lt;BR /&gt;&amp;lt;/root&amp;gt;&lt;/PRE&gt;
&lt;BR /&gt;If the person tag is looped having 2 rows (name1 and name2) would produce the following json, correctly:
&lt;BR /&gt;
&lt;PRE&gt;{ person:  }&lt;/PRE&gt;
&lt;BR /&gt;But if it's only one row (name1) the following json is produced:
&lt;BR /&gt;
&lt;PRE&gt;{ person: { name="name1" } }&lt;/PRE&gt;
&lt;BR /&gt;I guess this is a result of talend placing looped objects as tags, and one single tag has no indication of being a looped entity.
&lt;BR /&gt;Regardless, this needs to be resolved for the JSON output to be accurate. Consuming systems will otherwise have to validate the json outcome, or we need to manually change the string before passing it as a response.</description>
      <pubDate>Tue, 22 Sep 2015 13:49:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359312#M124165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-22T13:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359313#M124166</link>
      <description>Hi,&lt;BR /&gt;We are also waiting for someone who make this structure works. Is there any news?&lt;BR /&gt;Thanks&lt;BR /&gt;Rafael</description>
      <pubDate>Wed, 11 Nov 2015 21:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359313#M124166</guid>
      <dc:creator>rafaeltrein</dc:creator>
      <dc:date>2015-11-11T21:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359314#M124167</link>
      <description>Anyone solved this problem?
&lt;BR /&gt;How can I convert json objects into arrays of objects?</description>
      <pubDate>Thu, 31 Dec 2015 10:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359314#M124167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-31T10:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359315#M124168</link>
      <description>Any update with this? I'm facing the same problem.</description>
      <pubDate>Thu, 21 Jan 2016 08:09:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359315#M124168</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-21T08:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359316#M124169</link>
      <description>hi&amp;nbsp; 
&lt;BR /&gt;I couldn't create a json array in tjava row.can anyone help me out with the solution because I am new to this.... 
&lt;BR /&gt;I am getting this o/p. 
&lt;BR /&gt;{"Customer":"JI0000","RecordType":"POH","Warehouse":"","RecordNumber":"000001","OrderDate":"20140730","Action":"A","SalesOrder":"01","Company":"56","InboundOrder":"P0001982"} 
&lt;BR /&gt;but I need this inside an array...</description>
      <pubDate>Tue, 26 Jan 2016 08:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359316#M124169</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-26T08:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359317#M124170</link>
      <description>Any news ?&lt;BR /&gt;The issue still occurs when using TOS for Big Data 6.2.1</description>
      <pubDate>Tue, 20 Sep 2016 15:38:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359317#M124170</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-09-20T15:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359318#M124171</link>
      <description>I have the same problem: it returns:
&lt;BR /&gt;
&lt;FONT color="#000000"&gt;{"types":{"symbolicName":}}&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="#000000"&gt;needed is:&lt;BR /&gt;{"types":&lt;/FONT&gt;
&lt;FONT face="Verdana, Arial, Helvetica, sans-serif"&gt;}&lt;BR /&gt;&lt;/FONT&gt;
&lt;BR /&gt;I have tried multiple ways, but there seems to be no way to create this using TXMLMAP and responste
&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Oct 2016 08:47:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359318#M124171</guid>
      <dc:creator>stepro</dc:creator>
      <dc:date>2016-10-13T08:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359319#M124172</link>
      <description>Is there Update on this I do have same isse. Not able to create a JSON file with array []</description>
      <pubDate>Tue, 24 Jan 2017 21:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359319#M124172</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-24T21:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359320#M124173</link>
      <description>So this post is 4 years old. &amp;nbsp;People are obviously still having problems with this issue. &amp;nbsp;Talend Team, can you please respond? &amp;nbsp;I'm having the same issue as everyone here and not sure how to resolve it. &amp;nbsp;&lt;BR /&gt;Thanks!&amp;nbsp;</description>
      <pubDate>Fri, 10 Mar 2017 18:12:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359320#M124173</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2017-03-10T18:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359321#M124174</link>
      <description>Create an attribute under the field that you want as an array and default it as an array.</description>
      <pubDate>Wed, 15 Mar 2017 09:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359321#M124174</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-15T09:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359322#M124175</link>
      <description>I'm ran into the same problem with Talend 6.3.1. Talend Team, any news for us?</description>
      <pubDate>Tue, 21 Mar 2017 14:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359322#M124175</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2017-03-21T14:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359323#M124176</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Create an attribute under the field that you want as an array and default it as an array.&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;I like this idea, but how do you "default it as an array"</description>
      <pubDate>Wed, 22 Mar 2017 20:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359323#M124176</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2017-03-22T20:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359324#M124177</link>
      <description>Hi
&lt;BR /&gt;Type the word Array in the static Value column of the write Json task
&lt;BR /&gt;@class - Attribute
&lt;BR /&gt;set a fixed value - Array
&lt;BR /&gt;Works for me
&lt;BR /&gt;
&lt;BR /&gt;HTH</description>
      <pubDate>Wed, 29 Mar 2017 14:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359324#M124177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-29T14:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: json output... almost there. i need arrays and it's creating objects</title>
      <link>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359325#M124178</link>
      <description>Since this sounded indeed interesting, I checked it out. It seems to do the trick in forcing square brackets around the desired value if it has only on occurence. 
&lt;BR /&gt;Maybe I made some mistakes in my tWriteJSONField, but declaring for example my loop element as an array, I ended up with each element being an array inside an array of the loop elements. So it depends on how your JSON should look like, but it is still worth keeping in mind. 
&lt;BR /&gt;Btw: What worked for me,but it is not as neat and easy as some settings in tWriteJSONField, is manipulating the JSON String after tWriteJSONField by calling a self-written Java Routine which puts some [] around the content of a given element which I want to be an array. Maybe this is also an approach for others.</description>
      <pubDate>Wed, 29 Mar 2017 15:20:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/json-output-almost-there-i-need-arrays-and-it-s-creating-objects/m-p/2359325#M124178</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-29T15:20:37Z</dc:date>
    </item>
  </channel>
</rss>

