Boolean and null treatment in Table to Json

Dear KNIME developers and users:
I am struggling with a problem in the Table to Json node. My data has some boolean and null values. The output has the correct values (true, false and null) but the are quoted with ". This is not accepted in the application, the json file is later used in. I could post-process the file and replace all e.g. “true” with true using some KNIME-external tools but it would be really great if somebody could help me find a way to do this directly in KNIME.
Thanks a lot.
Thomas

Sorry, my mistake. The columns did not have the correct type.

Exactly!

You can change the column type to boolean by using the Column Expressions node:

if(column("column3")== "true") true
else if (column("column3")== "false") false

You can choose to replace the column and then change the column type to “Boolean Value” in configuration window of the node.

Best,
Armin

Dear Armin:
Thanks a lot. I used the rule engine for getting the Boolean values now and everything works perfectly.
Cheers.
Thomas

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.