Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any fundamental reason why standard .NET collections are not among supported types? #40

Open
voroninp opened this issue Aug 22, 2020 · 2 comments

Comments

@voroninp
Copy link

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? =)

@vsapronov
Copy link
Collaborator

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?

@voroninp
Copy link
Author

Sorry, F# calls it ResizeArray that is System.Collections.Generic.List<T>

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

No branches or pull requests

2 participants