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

Use json.RawMessage to delay serialisation/deserialisation #48

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

aidantwoods
Copy link
Owner

Fixes: #47

Instead of serialising and deserialising stored claim values multiple times, use json.RawMessage to allow serialisation to be delayed (when parsing) and done up-front (when creating a new token). This is necessary because the exact encoding used will depend on the original type, and this information is lost when decoding and then re-encoding absent that type information.

@aidantwoods aidantwoods merged commit 048ae02 into main Nov 19, 2023
11 checks passed
@aidantwoods aidantwoods deleted the fix/reserialise-bug branch November 19, 2023 12:21
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

Successfully merging this pull request may close these issues.

Does not properly encode/decode large values such as max uint64.
1 participant