<?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: Creating arrays in JSON with Talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Creating-arrays-in-JSON-with-Talend/m-p/2339098#M107274</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1-You should flag this checkbox in tWriteJsonField component:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 190px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lrp8.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147857i27DEACF0905F22E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lrp8.png" alt="0683p000009Lrp8.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;2-Regarding bracket issue, there is a JIRA bout it:&amp;nbsp;&lt;A href="https://jira.talendforge.org/browse/TDI-39421" target="_blank" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDI-39421&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If you have only one update line, you will get:&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"authentication": {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"token": "blablba"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;},&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"payload": {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"update": {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"liso": "AT",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"dlyr": "2017",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"delAutoModSave": "Y",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"updateDateTime": "Y"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But if you have two lines, you will get:&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"authentication": {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"token": "blablba"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;},&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"payload": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"liso": "AT",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"dlyr": "2017",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"delAutoModSave": "Y",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"updateDateTime": "Y"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;},&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"liso": "AT",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"dlyr": "2017",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"delAutoModSave": "Y",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"updateDateTime": "Y"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;3-You could use Data Mapper to get your expected structure (Even with a single update line).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Eric&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2017 10:18:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-11-27T10:18:59Z</dc:date>
    <item>
      <title>Creating arrays in JSON with Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-arrays-in-JSON-with-Talend/m-p/2339097#M107273</link>
      <description>&lt;P&gt;I was able to create this JSON strucure in Talend (with tWriteJSONField):&lt;/P&gt; 
&lt;PRE&gt;{
  "rootTag": {
    "authentication": {
      "token": "blablba"
    },
    "payload": {
      "update": {
        "liso": "AT",
        "dlyr": "2017",
        "delAutoModSave": "Y",
        "updateDateTime": "Y"
      }
    }
  }
}&lt;/PRE&gt; 
&lt;P&gt;But I don't know how to create this structure in Talend:&lt;/P&gt; 
&lt;PRE&gt;{
  "authentication": {
    "token": "blabla"
  },
  "payload": {
    "update": [
      {
        "liso": "AT",
        "dlyr": "2017",
        "delAutoModSave": "Y",
        "updateDateTime": "Y"
      }
    ]
  }
}&lt;/PRE&gt; 
&lt;P&gt;I need this to be a payload for the call to the service, How can I create the mention JSON structure with Talend?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 10:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-arrays-in-JSON-with-Talend/m-p/2339097#M107273</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-21T10:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating arrays in JSON with Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-arrays-in-JSON-with-Talend/m-p/2339098#M107274</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1-You should flag this checkbox in tWriteJsonField component:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 190px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lrp8.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147857i27DEACF0905F22E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lrp8.png" alt="0683p000009Lrp8.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;2-Regarding bracket issue, there is a JIRA bout it:&amp;nbsp;&lt;A href="https://jira.talendforge.org/browse/TDI-39421" target="_blank" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDI-39421&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If you have only one update line, you will get:&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"authentication": {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"token": "blablba"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;},&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"payload": {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"update": {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"liso": "AT",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"dlyr": "2017",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"delAutoModSave": "Y",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"updateDateTime": "Y"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But if you have two lines, you will get:&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"authentication": {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"token": "blablba"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;},&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"payload": [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"liso": "AT",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"dlyr": "2017",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"delAutoModSave": "Y",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"updateDateTime": "Y"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;},&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"liso": "AT",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"dlyr": "2017",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"delAutoModSave": "Y",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;"updateDateTime": "Y"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;3-You could use Data Mapper to get your expected structure (Even with a single update line).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Eric&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 10:18:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-arrays-in-JSON-with-Talend/m-p/2339098#M107274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-27T10:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating arrays in JSON with Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Creating-arrays-in-JSON-with-Talend/m-p/2339099#M107275</link>
      <description>&lt;P&gt;I need it for one line. So the only option is tHmap.&lt;/P&gt;&lt;P&gt;Aha I see the available options:&lt;/P&gt;&lt;PRE&gt;1) Use JSON string and tReplace to correct "wrong" node types
2) Use tXmlMap to build a DOM
3) Use tJSONDocOutput from Talend Exchange
4) Use Platform / TDM&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Nov 2017 12:42:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Creating-arrays-in-JSON-with-Talend/m-p/2339099#M107275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-27T12:42:13Z</dc:date>
    </item>
  </channel>
</rss>

