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

fixes #160 - addresses error deserializing malformed json string #161

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

agiveygives
Copy link
Contributor

@agiveygives agiveygives commented Nov 10, 2023

fixes #160

@@ -63,7 +63,7 @@ def serialize(value)
def deserialize(value)
case value
when String
payload = ActiveSupport::JSON.decode(value) rescue nil
payload = ActiveSupport::JSON.decode(value) rescue {}

Choose a reason for hiding this comment

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

good call assigning an empty Hash

Copy link
Owner

@DmitryTsepelev DmitryTsepelev left a comment

Choose a reason for hiding this comment

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

Makes sense! Thank you for fixing that @agiveygives and thank you @jcdennen for the report 🙂

@DmitryTsepelev DmitryTsepelev merged commit fbe40fe into DmitryTsepelev:master Nov 11, 2023
8 of 9 checks passed
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.

JSON deserializing empty string, leads to nil error
3 participants