Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TinyJson does not properly serialize long data type #90

Closed
thegoldenmule opened this issue Jul 14, 2020 · 9 comments
Closed

TinyJson does not properly serialize long data type #90

thegoldenmule opened this issue Jul 14, 2020 · 9 comments

Comments

@thegoldenmule
Copy link

Repro steps:

The Nakama TinyJson library does not properly support the long data type.

public class Foo
{
    public long Bar;
}

var a = new Foo { Bar = 100 };
a.ToJson(); // { "Bar": {} }

We have switched to using Newtonsoft JSON which properly serializes/deserializes longs.

@novabyte
Copy link
Member

Hmmm this is an odd one. We use the TinyJson library from here. We'll have a look to see what we can do to sort it.

@thegoldenmule
Copy link
Author

Looks like it actually doesn't support most primitives (unsigned and signed, short, long, etc). I can create a PR in that repo if it would be helpful.

@novabyte
Copy link
Member

@thegoldenmule That would be awesome if you have time 🙏

@thegoldenmule
Copy link
Author

@novabyte zanders3/json#36

@thegoldenmule
Copy link
Author

@novabyte The json PR has been merged to master btw.

@novabyte
Copy link
Member

Ah yes - good reminder. I'll re-import that code into the .NET client so we can cut a release of the Unity client.

@novabyte
Copy link
Member

I've updated the TinyJson library in the .NET client - heroiclabs/nakama-dotnet@651930a

@novabyte
Copy link
Member

We've got a release planned for the .NET client code and will then bundle it into the next Unity client.

@novabyte
Copy link
Member

This is resolved in the v2.5.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants