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

Support quoting unsigned integers when used as map keys #1969

Merged
merged 2 commits into from
Jun 17, 2022
Merged

Conversation

sandwwraith
Copy link
Member

Fixes #1966

// If we're inside encodeInline().encodeSerializableValue, we should preserve the forceQuoting state
// inside the composer, but not in the encoder (otherwise we'll get into `if (forceQuoting) encodeString(value.toString())` part
// and unsigned numbers would be encoded incorrectly)
return if (composer is ComposerForUnsignedNumbers) composer
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can lift forceQuoting to the base Composer class to avoid is-instance check. Although I'm not sure this micro-optimization would make any difference.

@sandwwraith sandwwraith merged commit 6a5ebd5 into dev Jun 17, 2022
@sandwwraith sandwwraith deleted the fix-1966 branch June 17, 2022 20:43
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.

2 participants