Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@dbrattli
Copy link
Collaborator

Summary

  • Add support for serializing F# typed arrays to JSON
  • Arrays are converted to Python lists via list()

Supported Array Types

Generic arrays:

  • FSharpArray
  • GenericArray

Typed arrays:

  • Int8Array, Int16Array, Int32Array, Int64Array
  • UInt8Array, UInt16Array, UInt32Array, UInt64Array
  • Float32Array, Float64Array

Examples

let values = [| 1; 2; 3 |]
Json.dumps values  // "[1, 2, 3]"

let obj = {| Items = [| "a"; "b" |] |}
Json.dumps obj  // '{"Items": ["a", "b"]}'

Test plan

  • Added tests for F# int arrays
  • Added tests for F# string arrays
  • Added tests for nested arrays in records
  • Added tests for empty arrays
  • All 200 tests pass

🤖 Generated with Claude Code

Add support for serializing F# typed arrays (Int32Array, Int64Array, etc.)
to JSON by converting them to Python lists.

Supported array types:
- Generic arrays: FSharpArray, GenericArray
- Typed arrays: Int8Array, Int16Array, Int32Array, Int64Array,
  UInt8Array, UInt16Array, UInt32Array, UInt64Array,
  Float32Array, Float64Array

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dbrattli dbrattli merged commit ef67b4b into main Dec 18, 2025
2 checks passed
@dbrattli dbrattli deleted the feat/json-array-support branch December 18, 2025 22:27
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.