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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ahsin
Contributor II
Contributor II

square brackets not appearing in json array with one record

Hi, I am using tWriteJsonField and have an array that has only one record. The output from talend does not put square brackets around the array, please see below example:
Required output:
{ "employees" :}

Talend output:
{ "employees" :
    { "firstName" : "John" "lastName" : "Doe" }}

Would request help on this.
Labels (3)
1 Reply
Anonymous
Not applicable

The problem here is Talend does not handle JSON internally.They do everything with XML.
Take a look in the documentation. There is a way to get an array by adding an @array attribute in the mapping configuration.
The other solution could be you use components which are dedicated to JSON without the workaround XML.
https://exchange.talend.com/#marketplaceproductoverview:gallery=marketplace%252F1&pi=marketplace%252...