Worked example
Before
alpha
betaAfter
[
"alpha",
"beta"
]Two input lines become two JSON strings in the default two-space layout.
Exactly what this changes
- PlainSift passes the line array directly to JSON.stringify. Quote marks, backslashes, tabs, control characters, and other required characters are escaped according to JSON rules rather than by hand-built concatenation.
- Every parsed line becomes one string item, including empty lines, duplicates, HTML-looking text, emoji, CJK text, and right-to-left text. A final source line terminator is tracked separately and does not create an extra empty array item.
- The default output is formatted with two spaces for review. Minified mode removes formatting whitespace between JSON tokens but never changes the characters represented by any string value.
Options and edge cases
- Choose pretty output for a multi-line, indented document or minified output for one compact line. Both modes are valid JSON and decode to the same array of strings.
- Run Trim lines or Remove empty lines before conversion only when those changes are actually wanted. JSON encoding itself preserves each parsed string and does not perform cleanup.
Edge case: This operation always creates an array of strings, not numbers or inferred JSON values. Text such as “true”, “42”, or a brace remains quoted string data.