Utf8Json
Utf8Json copied to clipboard
Is this supposed to compile with net standard 2.0?
It seems that the code is not net standard 2.0 compatible.
Why do you think that? https://github.com/neuecc/Utf8Json/blob/608cf01589cb3feb225a6e51a2324a24466fdaa6/src/Utf8Json/Utf8Json.csproj#L3
I'm trying to build it with Unity .net 2.0 compat and it fails for several reasons. Using the unitypackage with Unity 2019.3.
I don't have time to fix them all, but I'll tell you what I know in case someone else has the ambition to address this issue.
- some safe methods are erroneously marked unsafe like AutomataDictionary.Add
- various unsafe methods are defined outside any #if such as AutomataDictionary GetKey (should be #if guarded to choose only GetKeySafe) *note this whole pattern is generally bad - the safe/unsafe method name should be the same so callers don't have to #if on every call site.
- it looks like there was something trying to work with the commented out GetKeySafeMethod, but no code uses the safe version
- idk how the shims are suppose to work, but you can't mix a shim'ed type like TypeInfo from Reflection.cs with a real TypeInfo from mscorlib, things like IsNullable calls fail because of the miss-match.
I'm sure there is more, but I gave up at this time since my 'let me quickly drop in a fast json parser' turned into a major effort.
Also, I tried opening the unity project, but the unity simlink batch seems broken too. it made files for various directories.
Final bit of info, the unitypackage should ideally have an asmdef file included. I got a whole bunch of additional issue when I tried to include one myself, but without this nobody can use this package with UPM.
This does not seem usable for me either for Unity. I dont like things that dont compile.