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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Edith1
Creator
Creator

tWriteJSONField does not allow header names with special characters

The schema used to POST data by calling a rest API has required header names that contain special characters like asterisk * and question symbol ?. I would like to use the tWriteJSONField to create the schema for the trestclient input. However, tWriteJSONField does not allow names with special characters. Any idea, how would I pass the header columns with * or ? to the input of the rest call?

Labels (2)
3 Replies
Anonymous
Not applicable

Hi

Talend studio is Java code generator, the column name will be translated to a Java variable, so the column name is not allowed to contain special characters.

 

Regards

Shong

gjeremy1617088143

HI I try to bypassed it via unicode ex \u022A for * tWriteJsonField allow it in the element name but after it throw exception from the dom4j.QName.validateName() class :

java.lang.IllegalArgumentException: Illegal character in name: 'gghh*'.

   at org.dom4j.QName.validateName(QName.java:340)

gjeremy1617088143

So I think the better way is to write the json with non special char and then add them to the string with some replaceAll().