Skip to content

fix: emit real JSON values for CLI batch Object/Array/Number cells - #277

Merged
Yuta-K19418 merged 4 commits into
mainfrom
fix/jsonlines-batch-cell-raw-value
Aug 8, 2026
Merged

fix: emit real JSON values for CLI batch Object/Array/Number cells#277
Yuta-K19418 merged 4 commits into
mainfrom
fix/jsonlines-batch-cell-raw-value

Conversation

@Yuta-K19418

@Yuta-K19418 Yuta-K19418 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace GetCellSpan/WriteCellSpan with a typed CellData (CellPresence/CellEncoding) channel across CSV and JSON Lines readers/writers, so CLI batch output no longer reuses the TUI's display-preview strings for Object/Array/Number values.
  • JsonLinesRecordReader now derives presence/encoding directly from Utf8JsonReader tokens instead of the "<null>"/"<error>" string-sentinel convention, making Missing distinct from Null and JSON Lines → JSON Lines a true structural round-trip.
  • CSV behavior (CSV → CSV, CSV → JSON Lines, transformed columns) is unchanged; classification is centralized in the new CellEncodingClassifier.

See docs/design_batch_cell_typed_channel.md for the full design and decision record.

Test plan

  • dotnet build — 0 warnings, 0 errors
  • dotnet format --verify-no-changes — no diff
  • dotnet test — 1577/1577 passing, including new reader/writer/classifier unit tests and end-to-end RunnerTests covering Object/Array with non-ASCII, numeric lexical forms (1.50, 1e10, Int64-overflow), string escapes, sentinel-looking strings, Missing vs Null, CSV 007 normalization, and FillSpec/TimestampFormatSpec numeric output

Closes #267

Yuta-K19418 and others added 4 commits August 7, 2026 22:31
CellEncoding-based CellData replaces CellSpan for CSV/JSON Lines
reader-writer channel, fixing Object/Array data loss in batch mode.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace GetCellSpan/WriteCellSpan with CellData-based GetCellData/WriteCellData
across CSV and JSON Lines readers/writers so Object/Array/Number values carry
real presence and encoding instead of TUI display-preview strings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Implement CellEncodingClassifier and the reader/writer GetCellData/
WriteCellData dispatch so Object/Array/Number values round-trip as real
JSON instead of TUI display-preview strings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Note the Sonar complexity limit and ref-struct escape rule (CS8168/
CS8347) that rule out inlining or passing by ref.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Yuta-K19418
Yuta-K19418 merged commit 7e98d7c into main Aug 8, 2026
6 checks passed
@Yuta-K19418
Yuta-K19418 deleted the fix/jsonlines-batch-cell-raw-value branch August 8, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI batch mode outputs tree/table display preview strings instead of raw values for JSON Object/Array columns

1 participant