Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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)
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().