By flat I mean without nesting. That supports streaming. Where 1 line contains all data…
- User
By flat I mean without nesting. That supports streaming. Where 1 line contains all data needed to resolve for each element.
Assistant
Ah, I understand now - you're looking for single-line serialization formats where each line is self-contained and can be processed independently in a streaming fashion. Here are the key formats:
1. CSV/TSV with Headers
timestamp,user_id,action,data 2024-05-04T12:00:00Z,123,login,{"ip":"1.2.3.4"} 2024-05-04T12:01:00Z,123,view_page,{"page":"/home"}2. Line-delimited JSON (JSONL/NDJSON)
{"timestamp":"2024-05-04T12:00:00Z","user_id":123,"action":"login","ip":"1.2.3.4"} {"timestamp":"2024-05-04T12:01:00Z","user_id":123,"action":"view_page","page":"/home"}3. Pipe-delimited format
2024-05-04T12:00:00Z|123|login|1.2.3.4|chrome|en-US 2024-05-04T12:01:00Z|123|view_page|/home|chrome|en-US4. Fixed-width format
20240504120000123LOGIN 1.2.3.4 CHROME 20240504120100123VIEWPAGE /home CHROMEKey characteristics:
- Each line is self-contained
- No nesting/indentation
- Can be processed one line at a time
- Supports streaming reads/writes
- No need to hold entire dataset in memory
Common use cases:
- Log files
- Event streams
- ETL pipelines
- Data ingestion
- Audit trails
- Time series data
JSONL is becoming increasingly popular as it combines the flexibility of JSON with line-based processing capabilities.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.