Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Incorrect Output Json Format

In Talend 5.3.1 , 
I am trying to output JSON but the format is Incorrect .
The input file is CVS . 

The Excepted results are :-
{
   "properties": [
      {
         "property": {
            "reportdatefrom": "5/12/2016  2:31:29 PM",
            "reportdateto": "12/31/9999  12:00:00 AM",
            "entitycode": "1000750",
            "propertyvalue": {
               "jvalue": {
                  "eng": "bank",
                  "fra": "banque"
               }
            }
         }
      },
      {
         "property": {
            "reportdatefrom": "5/12/2016  2:31:29 PM",
            "reportdateto": "12/31/9999  12:00:00 AM",
            "entitycode": "1000720",
            "propertyvalue": {
               "jvalue": {
                  "eng": "tissot",
                  "fra": "ploru"
               }
            }
         }
      },
      {
         "property": {
            "reportdatefrom": "5/12/2016  2:31:29 PM",
            "reportdateto": "12/31/9999  12:00:00 AM",
            "entitycode": "1000760",
            "propertyvalue": {
               "jvalue": {
                  "eng": "can",
                  "fra": "Hugo"
               }
            }
         }
      }
   ]
}

But My output is 
{"properties":[{"property":"{\"reportdatefrom\":\"5\/12\/2016  2:31:29 PM\",\"reportdateto\":\"12\/31\/9999  12:00:00 AM\",\"entitycode\":\"1000750\",\"propertyvalue\":{\"jvalue\":{\"eng\":\"bank\",\"fra\":\"banque\"}}}"},{"property":"{\"reportdatefrom\":\"5\/12\/2016  2:31:29 PM\",\"reportdateto\":\"12\/31\/9999  12:00:00 AM\",\"entitycode\":\"1000720\",\"propertyvalue\":{\"jvalue\":{\"eng\":\"tissot\",\"fra\":\"ploru\"}}}"},{"property":"{\"reportdatefrom\":\"5\/12\/2016  2:31:29 PM\",\"reportdateto\":\"12\/31\/9999  12:00:00 AM\",\"entitycode\":\"1000760\",\"propertyvalue\":{\"jvalue\":{\"eng\":\"can\",\"fra\":\"Hugo\"}}}"}]}
 
0683p000009M5p3.png0683p000009MHMS.png
0683p000009MHPp.png

Labels (2)
1 Reply
Anonymous
Not applicable
Author

The problem is you create a JSON string and the output component tFileOutputJSON takes this as content and not as a ready to use json structure.
Write the content with a tFileOutputRaw component or similar which does not tries to put the content itself into a json structure.