fix: emit real JSON values for CLI batch Object/Array/Number cells - #277
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GetCellSpan/WriteCellSpanwith a typedCellData(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.JsonLinesRecordReadernow derives presence/encoding directly fromUtf8JsonReadertokens instead of the"<null>"/"<error>"string-sentinel convention, makingMissingdistinct fromNulland JSON Lines → JSON Lines a true structural round-trip.CellEncodingClassifier.See
docs/design_batch_cell_typed_channel.mdfor the full design and decision record.Test plan
dotnet build— 0 warnings, 0 errorsdotnet format --verify-no-changes— no diffdotnet test— 1577/1577 passing, including new reader/writer/classifier unit tests and end-to-endRunnerTestscovering Object/Array with non-ASCII, numeric lexical forms (1.50,1e10,Int64-overflow), string escapes, sentinel-looking strings, Missing vs Null, CSV007normalization, and FillSpec/TimestampFormatSpec numeric outputCloses #267