Closed KB4MDD closed 5 months ago
Did you try setting JsonSerializerIsReflectionEnabledByDefault
to false
?
I tried setting that property to false and it still fails. I also tried setting to true and it still fails.
Thanks for reporting. I'm not very well equipped to troubleshoot support for less-common platforms, so I try and lean on the community to help with things like this.
I have worked around the problem using the source generation capabilities in system.text.json.
It would be nice to have Issue #777 implemented so that a context could be passed to Flurl.
I am closing this issue.
I am compiling my .NET 8 application for linux-arm, I have enabled the produce single file and trim unused code options. Flurl raises the exception "Response could not be deserialized to JSON". When I uncheck the "trim unused code" option, there is no exception.
It is clear that the compiler and linker are discarding something that Flurl needs to deserialize the JSON data. This may be addressed by changes asked for in #777.
I am moving my application from .NET 6 to .NET 8. I did not have an issue with .NET 6.