daviddesmet / paseto-dotnet

🔑 Paseto.NET, a Paseto (Platform-Agnostic Security Tokens) implementation for .NET
MIT License
101 stars 8 forks source link

When would the payload value ever not be a JsonElement? #134

Open grosch opened 2 months ago

grosch commented 2 months ago

When I decode the token, I get back a payload that's a Dictionary<string, object>. When would the value ever not be of type JsonElement?

daviddesmet commented 1 month ago

With the change from System.Text.Json it seems to be always the case unless you use a custom IJsonSerializer.

grosch commented 1 month ago

Can we type it as such then to make things easier?

daviddesmet commented 1 month ago

I would have to take a look into in a spare time, but feel free to propose the change in a PR