Structured Log — Lone Surrogate Escapes, Intentionally Invalid (jsonl)
Two records containing unpaired \ud800 and \udfff escapes between three well-formed ones, plus a correct surrogate pair for comparison. Intentionally invalid: the escapes are syntactically legal JSON but cannot be encoded as UTF-8, which is where a re-serialising pipeline breaks.
{"ts":"2026-03-17T09:14:32.850Z","level":"info","msg":"valid record before","seq":1}
{"ts":"2026-03-17T09:14:32.970Z","level":"error","msg":"lone high surrogate: \ud800 in the middle","seq":2}
{"ts":"2026-03-17T09:14:33.090Z","level":"error","msg":"unpaired low surrogate: \udfff here","seq":3}
{"ts":"2026-03-17T09:14:33.210Z","level":"info","msg":"valid surrogate pair: \ud83d\ude80","seq":4}
{"ts":"2026-03-17T09:14:33.330Z","level":"info","msg":"valid record after","seq":5}
Specifications
- Lines
- 5
- Lone Surrogate Records
- 2
- Valid Surrogate Pair Records
- 1
- Intentionally Invalid
- true
- Rule
- a lone surrogate has no UTF-8 encoding
Testing contract
Expected to fail- Scenario
- Parse all five records and re-serialise them as UTF-8.
- Expected result
- Records 1, 4 and 5 round-trip — including the rocket emoji from the valid surrogate pair — while records 2 and 3 are rejected or replaced with U+FFFD instead of producing invalid UTF-8 output.
What is a .jsonl file?
JSONL (JSON Lines) is a text format where each line is a complete, independent JSON value, allowing records to be streamed and appended without parsing the whole file. It is not itself a JSON array and each line must stand alone. It is common in logging, machine learning datasets, and data pipelines.
How to use this file
Use an example JSONL to test line-by-line streaming parsers, append-and-resume ingestion, and batch pipelines that process one record per line.
How to use this file for testing
“Structured Log — Lone Surrogate Escapes, Intentionally Invalid (jsonl)” is a deterministic Novus Examples fixture for Observability, Encoding detection, Error handling. Structured and plain-text telemetry with known timestamps, levels, request identifiers, and error states for testing log ingestion, correlation, dashboards, and alert pipelines.
Documented properties for this file: JSONL · 479 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Telemetry fixtures use fixed trace IDs, span IDs, and timestamps so ingestion is reproducible run to run. Point your collector, parser, or query layer at the file and assert the documented span tree, metric families, or severity mix; service and host names are invented.
Code examples
import json
with open("app-lone-surrogates.jsonl") as f:
rows = [json.loads(line) for line in f]
print(len(rows), rows[0])Related files
- log.NET Exception with an Inner Exception Chain (log)A .NET exception whose inner exception is introduced by the ---> marker and closed by End of inner exception stack trace, wrapped in pipe-delimited log lines. Error groupers that key on the outermost message alone merge two genuinely different faults here.

- logGo Panic with Full Goroutine Dump (log)A Go panic followed by the runtime's full goroutine dump — four goroutines with their wait states, two-line frames and a created by attribution, separated by blank lines. Blank-line separation defeats multi-line rules that treat an empty line as the end of an event.

- loglogfmt — Quoting, Escaping and Bare-Key Edge Cases (log)logfmt lines built to break naive splitting on spaces and equals signs: a value containing an equals sign, escaped quotes, a trailing backslash before the closing quote, a bare key with no value, duplicate keys, non-ASCII values and one unterminated quote followed by a clean line.

- logPlain-Text Log — ANSI Colour Codes in the Stream (log)A developer-mode log where the level and service are wrapped in ANSI colour codes, ending with one uncoloured line. Colour codes sit inside the field a parser wants to read, so level extraction fails unless the sequences are stripped first — the classic symptom of a container run without a TTY check.

- logPlain-Text Log — Mixed CRLF and LF Line Endings (log)One log file written by two agents, four lines ending CRLF and three LF, with one line carrying trailing spaces before its break. Splitting on \n alone leaves a stray carriage return at the end of four fields, which is how a level or status ends up with an invisible character attached.

- logPlain-Text Log — Multi-Line Events Needing Line Joining (log)A Spring-style text log where two stack traces span many physical lines. Eight logical events across a larger number of lines, so a shipper's multi-line rule — anything not starting with a timestamp continues the previous event — can be scored against a known answer.

Generated by generation/observability.py. Free for any use, no attribution required — license.