FSharp.Json
FSharp.Json copied to clipboard
Is there any fundamental reason why standard .NET collections are not among supported types?
I tried to serilize result returned by C# code - that is List<T>
- and got an exception that List is not supported. Just curioius why? =)
Hi, some types I could support but keep in mind that competing with Newtonsoft was never a goal of this library. One of the complexities would be provide/not to provide null-safely depending on where type is coming from.
Could you please be more specific about List
that you refer to. What is the full name of the class?
From quick look at this it seems that List
should be supported: https://github.com/vsapronov/FSharp.Json/blob/227a04799cf3216178dcafbc3297ac4b559f194e/FSharp.Json/Reflection.fs#L18-L19
Do you think you could code a little pure F# example where you create instance of List
and getting the "not supported" error?
Sorry, F# calls it ResizeArray
that is System.Collections.Generic.List<T>