mono_v2_get_started
mono_v2_get_started copied to clipboard
'Native' JSON support
Goal
If you want to work with JSON you'd have to ship an 'old' portable build of e.g. Json.NET (aka Newtonsoft.Json) with your resource.
Only portable builds are supported by FiveM (at least in v1), but building as portable-net45 is deprecated and many libs dropped support.
The goal would be to have a JSON implementation like Json.NET or System.Text.Json in v2 without providing 3rd party libs with your resource.
Importancy
Overal quality to the runtime
API and/or potential implementation
System.Text.Json is getting shipped with the runtime since .NET Core 3.0, but is also compatible with older versions and .NET Framework.
Would it be possible to ship System.Text.Json with v2?
Extra
No response
I've been thinking about something like this. I'll have a look into this NuGet package, thanks!
I'd keep using the 3rd party library Newtonsoft.Json even if System.Text.Json was integrated, there's a reason it has 3.3 billion downloads on NuGet. The best thing in my opinion would be to support .NET 6.0 or .NET 7.0 in FiveM but it's just a dream :(
there's a reason it has 3.3 billion downloads on NuGet
One would be that System.Text.Json was introduced by Microsoft in 2019, while Json.NET released in 2006, but anyone has their preference anyways and discussions like that are pretty pointless (like "iOS or Android")...
This issue is marked as stale because it has been open for 30 days without any activity.
System.Text.Json has serious improvements in the allocation department and notably a much larger range of support, bonus points that it has source-gen options
net6 and up support would be pretty big for Client & Server resources
Doubt we'll see movement to newer versions of .NET for a while due to the sandboxing within FiveM. There have been a lot of discussions on it, all of them shut down.