Generate a safe, quoted JSON string from any object or array.
The tool serializes the parsed value and escapes quotes, newlines and control characters so the output can be pasted directly into source code.