Tarmil / FSharp.SystemTextJson

System.Text.Json extensions for F# types
MIT License
325 stars 44 forks source link

Converting array of array or list of lists #55

Closed dmtrrk closed 3 years ago

dmtrrk commented 4 years ago

This package contains F# lists converter. But it does not work with included arrays:

type MyType () = 
    member val Items: int array array = [||] with get, set

for such JSON

"{ \"items\": [[1, 2, 3], [4, 5, 6]] }"

This will fail with

System.NotSupportedException: Collection was of a fixed size
mbuhot commented 4 years ago

@deeptowncitizen does that example work with C#? It looks like the same error as this issue fixed by this PR, but I'm not sure if that fix is in .net core 3.1, or we have to wait for .net 5.0.