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

Fix ToJSON for PersistValue #1223

Merged
merged 4 commits into from
Apr 1, 2021
Merged

Fix ToJSON for PersistValue #1223

merged 4 commits into from
Apr 1, 2021

Conversation

parsonsmatt
Copy link
Collaborator

@parsonsmatt parsonsmatt commented Apr 1, 2021

Before submitting your PR, check that you've:

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

Unescaped -> 'l'
Escaped -> 'e'
in
A.String $ T.cons prefix encoded
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is exactly the problem I was trying to solve, and exactly the problem that my patch introduced. Sigh. I'm disappointed that I didn't catch it.

So - the patch makes PersistDbSpecific a catch-all match, expanding to PersistLiteral_ _ bs. Which means that the PersistDbSpecific woudl encode all values with the p prefix! That's bad. This fixes that problem.

@parsonsmatt parsonsmatt merged commit f102aa8 into master Apr 1, 2021
@parsonsmatt parsonsmatt deleted the matt/fix-json-encoding branch April 1, 2021 16:54
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.

1 participant