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

[set] Set should error when it cannot correctly marshal JSON #38

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

cacoco
Copy link
Owner

@cacoco cacoco commented Feb 7, 2024

Problem

Right now when set cannot marshal the incoming string data into an object or array
it treats the result as a string, However, it should fail for malformed JSON rather
than allowing the malformed JSON to be added as a string value for the given
property key.

Solution

Fail if the marshaling fails when the string starts with either a { or a [ indicating that
the input string should be a JSON object or array respectively.

Result

Better error signaling to users when invalid JSON is given.

@cacoco cacoco added this to the v0.48.0 milestone Feb 7, 2024
@cacoco cacoco self-assigned this Feb 7, 2024
@cacoco cacoco merged commit eacf801 into main Feb 7, 2024
1 check passed
@cacoco cacoco deleted the setFixes branch February 7, 2024 02: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