apply cleanCtrlChars while building JSON