Replace control characters with spaces in JSON