Closed lucasteles closed 10 months ago
These are already supported by FSharp.SystemTextJson. You just need to make sure to use the serializer options.
let tuple2 = "one", 2
let tuple3 = true, "value", 42
let options = JSonFSharpOptions().ToJsonSerializerOptions()
JsonSerializer.Serialize(tuple2, options) // ['one', 2]
JsonSerializer.Serialize(tuple3, options) // [true, 'value', 42]
It is common to represent tuples in TypeScript (also json) using fixed-size arrays
So it would be great to have these options here
Eg: