Remove control characters from JSON strings, fixes #290