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

System.Text.Json serialization compile-time generator #11891

Open
xperiandri opened this issue Jul 25, 2021 · 4 comments
Open

System.Text.Json serialization compile-time generator #11891

xperiandri opened this issue Jul 25, 2021 · 4 comments

Comments

@xperiandri
Copy link
Contributor

In order to have parity with C# https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/ it would be nice to have the same compile-time serialization logic generation for F#.

Describe the solution you'd like

Maybe a type provider could help?

Describe alternatives you've considered

Use separate C# project for such generators invocation

@kerams
Copy link
Contributor

kerams commented Jul 25, 2021

This is what you're looking for fsharp/fslang-suggestions#864.

@xperiandri
Copy link
Contributor Author

Probably https://github.com/fsharp/fslang-design/blob/main/RFCs/FS-1023-type-providers-generate-types-from-types.md is more suitable

@xperiandri
Copy link
Contributor Author

This is what you're looking for fsharp/fslang-suggestions#864.

But that could be an option

@xperiandri
Copy link
Contributor Author

xperiandri commented Jul 25, 2021

From my experience, I used SwaggerProvider and FSharp.Data.GraphQL.Client but move to Snowflaqe and Hawaii because type providers do not allow you to use FsAst or plain F# sources and create unions and records. If those issues will be resolved type providers became in favor again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New
Development

No branches or pull requests

4 participants