mgholam / fastJSON

Smallest, fastest polymorphic JSON serializer
https://www.codeproject.com/Articles/159450/fastJSON-Smallest-Fastest-Polymorphic-JSON-Seriali
MIT License
479 stars 147 forks source link

do not support .net8 #142

Closed FlameskyDexive closed 11 months ago

FlameskyDexive commented 11 months ago

do not support .net8, will it fixed in the future?

mgholam commented 11 months ago

The DLL files should work, the project should also work if you upgrade the framework version.

FlameskyDexive commented 11 months ago

The DLL files should work, the project should also work if you upgrade the framework version.

thanks for reply so fast, cause "FormatterServices" is obsolete in .net8, i can't figure out any new api to replace this, so it can't be used in .net8 program. the error details "Severity Code Description Project File Line Suppression State Error SYSLIB0050 'FormatterServices' is obsolete: 'Formatter-based serialization is obsolete and should not be used.' (https://aka.ms/dotnet-warnings/SYSLIB0050)", i use the source code to compile.

mgholam commented 11 months ago

Thanks, I will look into it.

FlameskyDexive commented 11 months ago

image error line720 in JSON.cs

mgholam commented 11 months ago

Try :

o = System.Runtime.CompilerServices.RuntimeHelpers.GetUninitializedObject(type);
FlameskyDexive commented 11 months ago

Try :

o = System.Runtime.CompilerServices.RuntimeHelpers.GetUninitializedObject(type);

wow, it builds successful now, thanks so much!!!