isJsonSequence
Checks whether a value is a string holding a valid JSON text sequence (RFC 7464,
application/json-seq): records that each start with the record separator (U+001E) and hold
one complete, strict JSON text.
It accepts exactly what @helpers4/json’s parseSequence accepts with its default options —
every record must be valid, including the RFC’s check that a top-level number, true, false
or null is followed by whitespace. An empty string is valid: it holds zero records.
Available since v3.1.3
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is string — true if value is a string that parseSequence from @helpers4/json reads without error
Examples
Section titled “Examples”Check a JSON text sequence
Section titled “Check a JSON text sequence”Records framed by the record separator U+001E.
Detect a truncated number
Section titled “Detect a truncated number”RFC 7464 treats a top-level number without trailing whitespace as possibly truncated.
