Description
Reject carriage returns, split nonempty text on linefeeds, and drop one final terminator entry.
A line-delimited JSON record stream places a complete JSON value on each record line. Terminal newlines and blank-line policies affect record counts independently of value parsing.
Reject carriage returns, split nonempty text on linefeeds, and drop one final terminator entry.
When to use this tool
Use JSON Lines Terminal Newline State when you need the implemented strict line-ending and record-count check.
How to use the tool and how it works
- Enter text. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read terminated, empty, records. Inspect terminated, empty before interpreting the associated values.
Reject carriage returns, split nonempty text on linefeeds, and drop one final terminator entry. Require every remaining line nonempty and parse each as JSON; return termination state and record count.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| text | Text | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| terminated | Terminated | Required. Boolean. |
| empty | Whether the represented collection or span has no occupied elements. | Required. Boolean. |
| records | Records | Required. Safe integer. |
{
"input": {
"text": "1\n2\n"
},
"output": {
"terminated": true,
"empty": false,
"records": 2
}
} Limitations and assumptions
- Empty input has zero records; blank lines and CRLF are rejected, and no streaming or per-record output is provided.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a streaming parser with an explicit line-format policy for large files and record-specific error reporting.
References
Similar or alternative tools
- JSON String Line Continuation Rejection
Detect a backslash followed by CRLF, CR, or LF.
- JSON: JSON Array Terminal Comma Position
Detect a comma followed only by whitespace and the final bracket, returning its offset or -1.