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

More accurately parse json values for params #1661

Merged

Conversation

matthewmcgarvey
Copy link
Member

Purpose

In the cases where the value of a json field is a JSON object, it was inaccurately returning the string representation of the hash instead of the JSON object. So, instead of calling .to_s on JSON::Any we call .to_json with one caveat and that is String values. Calling .to_json on a string wraps the string in escaped quotes.

Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

👍

@matthewmcgarvey matthewmcgarvey merged commit ecf19a0 into luckyframework:master Feb 1, 2022
@matthewmcgarvey matthewmcgarvey deleted the params-json-parsing branch February 1, 2022 04:10
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