JSON Escape Tool — illustrative example INPUT Encode the text hello followed by one line break and then world as a complete JSON string literal. Preserve the line break when parsed back. RESULT "hello\nworld" The JSON source contains a backslash followed by n, not an unescaped newline inside the quotes. Parsing this string returns the original text with one line break. REVIEW JSON string escaping must handle quotes, backslashes and control characters. Use a serializer rather than a sequence of improvised substitutions. This is a teaching example, not a live execution record.