Conversation
Closes #556 Implement JSON serialization support for Deedle data frames, supporting three orientation modes (mirroring pandas to_json): - "columns" (default): column-major {"col":{"row":v,...},...} - "index": row-major {"row":{"col":v,...},...} - "records": array of row objects [{"col":v,...},...] New API surface: - F# module: Frame.toJson orient frame, Frame.saveJson path frame - F# extension methods: frame.ToJson(?orient), frame.SaveJson(writer,?orient), frame.SaveJson(path,?orient) - C# static extension methods: Frame.ToJson(frame,orient), Frame.SaveJson(frame,writer,orient), Frame.SaveJson(frame,path,orient) Implementation notes: - No new dependencies; JSON is written with a simple manual TextWriter approach - float/float32 NaN and Infinity serialize as null (consistent with pandas default) - DateTime/DateTimeOffset keys and values use ISO 8601 round-trip format ("o") - All string keys and values are properly escaped per the JSON spec - OptionalValue<T> column types are unwrapped (consistent with SaveCsv) Co-authored-by: Copilot <[email protected]>
9 tasks
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.
🤖 Repo Assist — automated AI implementation in response to maintainer request.
Closes #556
Summary
Implements JSON serialization for Deedle data frames, mirroring pandas'
to_jsonAPI. No new dependencies are introduced — JSON is written using a simpleTextWriter-based approach.New API
F# module functions
F# extension methods
C# static methods
Built and tested on Linux with
dotnet test tests/Deedle.Tests/Deedle.Tests.fsproj -c Release.