Closed fpellet closed 1 month ago
Thanks for opening this PR @fpellet.
Nevertheless, I suggest making things easier and offering a configuration via FSharp.SystemTextJson for example directly via the project so as not to add a barrier.
Fair enough, I like this idea!
adding to this the current docs are broken:
that thing can't be found.
For FSharp.SystemTextJson , I'll have a look this weekend.
@forki indeed, I had seen that and forgot to put it back up.
Necessary changes in the doc: It need to delete this constructor, and initialize in services:
services.AddSingleton<Json.ISerializer>(fun serviceProvider ->
NewtonsoftJson.Serializer(JsonSerializerSettings(), serviceProvider.GetService<Microsoft.IO.RecyclableMemoryStreamManager>()) :> Json.ISerializer) |> ignore
I think it makes sense to add a new sample to this project showing how to add NewtonsoftJson back properly.
@64J0 It's possible to publish new version? 😊
As in new NuGet or publish documentation? (For NuGet 7.0.0 is published right? https://www.nuget.org/packages/Giraffe/7.0.0)
Nuget to use new serialiser without copy paste
@64J0 It's possible to publish new version? 😊
Sure, working on it right now.
Version 7.0.1 released 🚀 https://www.nuget.org/packages/Giraffe/7.0.1
With the change https://github.com/giraffe-fsharp/Giraffe/issues/560 , unlike before, by default the serializer is not compatible with the particularities of F#. As this can have an impact on performance, I can understand not setting a compatible serializer by default, even if I think it's a shame for a project like Giraffe. Nevertheless, I suggest making things easier and offering a configuration via
FSharp.SystemTextJson
for example directly via the project so as not to add a barrier.