-
Notifications
You must be signed in to change notification settings - Fork 266
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
Add F# compatible json serializer #609
Conversation
I added some commits to this PR @fpellet, let me know what you think, and feel free to revert them if you dislike it. |
It's fine for me 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also second way - just use the recyclableMemoryStreamManager
constant:
new(settings : JsonSerializerSettings) = Serializer(
settings,
Lazy<RecyclableMemoryStreamManager>().Value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if this other approach does provide some improvement compared to the one mentioned at this PR? Just curiosity due to this usage of Lazy<'T> and RecyclableMemoryStreamManager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not important one, but as Lazy<RecyclableMemoryStreamManager>()
was the default, it was one argument less in code. :)
Just started using Giraffe
and OpenApi
and you guys are doing great work with those 🎉 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks for the feedback 🚀
Description
Add F# compatible json serializer with
FSharp.SystemTextJson
:Json.FsharpFriendlySerializer
How to test
Use
Json.FsharpFriendlySerializer
Related issues
#604