JSON escaping solves the syntax collision that appears when one JSON document must live inside another string. Quotes, backslashes, line breaks, and tabs already have meaning to the host string; escaping replaces them with backslash sequences without changing the underlying data.
The tool parses and minifies the document before escaping it, so malformed JSON is reported instead of being wrapped as a plausible-looking string. Unescape performs the reverse operation for JSON copied from logs, environment variables, or source code.