<?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 tWriteJSONField component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295359#M68143</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question regarding writing JSON from MySQL data. For example, I have a STRING column (code) that has a value of [ ] (open and close brackets only), why doesn't tWriteJSONField&amp;nbsp;component enclose the value with double quotes even though the column is declared as STRING? Currently, the JSON output looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"code":[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the expected is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"code":"[]"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already checked the "Quote all values" option in the TWriteJSON component as can be seen in the attached photo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:03:22 GMT</pubDate>
    <dc:creator>EBardies</dc:creator>
    <dc:date>2024-11-15T23:03:22Z</dc:date>
    <item>
      <title>tWriteJSONField component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295359#M68143</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question regarding writing JSON from MySQL data. For example, I have a STRING column (code) that has a value of [ ] (open and close brackets only), why doesn't tWriteJSONField&amp;nbsp;component enclose the value with double quotes even though the column is declared as STRING? Currently, the JSON output looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"code":[]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the expected is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"code":"[]"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already checked the "Quote all values" option in the TWriteJSON component as can be seen in the attached photo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:03:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295359#M68143</guid>
      <dc:creator>EBardies</dc:creator>
      <dc:date>2024-11-15T23:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: tWriteJSONField component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295360#M68144</link>
      <description>&lt;P&gt;The open and close square brackets represent an array in JSON. I'll need to know more about the JSON structure and your configuration to understand whether this is meant as a String value of "[]" or whether this has been setup as an array. &lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 13:43:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295360#M68144</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-04T13:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: tWriteJSONField component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295361#M68145</link>
      <description>&lt;P&gt;Hi @Richard Hall​, thank you for your response. It is actually meant to be a String. The value "[]" is a user input which is being successfully saved in the DB as is. The problem occurs when it writes to a JSON, it doesn't recognize the value as a String but an array.  See the JSONs below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output of tWriteJSON:&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;B&gt;"code":[]&lt;/B&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"abbreviation":" ",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"specName":" ",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"showOrder":" ",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"use":"3",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"specCode":"MS ",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"active":true,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"rowId":172,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"visible":true,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"isCodeUpdated":false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected:&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;{&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"code":"[]",&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"abbreviation":" ",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"specName":" ",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"showOrder":" ",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"use":"3",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"specCode":"MS ",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"active":true,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"rowId":172,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"visible":true,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;"isCodeUpdated":false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We want it to be treated as a String and not an array. &lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 02:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295361#M68145</guid>
      <dc:creator>EBardies</dc:creator>
      <dc:date>2022-04-05T02:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: tWriteJSONField component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295362#M68146</link>
      <description>&lt;P&gt;Hmmm, I have tested this and it appears to be a bug caused by the fact that [] is intended to represent arrays. I am raising this as a bug with R&amp;amp;D now. I have found a workaround (which is not ideal, but will work). If you change any String that comes in as "[]" to something unique, like "[bracketreplaceworkaround]", you can produce the JSON with the field typed correctly. Then in a tJavaFlex afterwards you can carry out a String replace, replacing "[bracketreplaceworkaround]" with "[]".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this is not ideal at all and I am raising this straight away.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 10:02:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tWriteJSONField-component/m-p/2295362#M68146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-05T10:02:13Z</dc:date>
    </item>
  </channel>
</rss>

