escape control and other unprintable characters in json