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

Invalid json parsing errors #105

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Invalid json parsing errors #105

merged 2 commits into from
Oct 28, 2024

Conversation

Thomasvdam
Copy link
Member

Motivation

Improved error messages when the received values don't match the declared types.

Explanation of Changes

Update "json-as" to v0.9.26

There are still some values which should be invalid that get accepted,
such as a string without the closing double quotes, but overall the
error message for the edge cases we had have improved significantly.

Stack traces are still poor due to the constraints of WASM, but there is
work being done on a transform to allow try/catch and Rust style
results.

Testing

Added a test that initially resulted in a max memory allocation error and now at least mentions that somewhere the user expected a string but received something else.

Related PRs and Issues

N.A.

Update "json-as" to v0.9.26

There are still some values which should be invalid that get accepted,
such as a string without the closing double quotes, but overall the
error message for the edge cases we had have improved significantly.

Stack traces are still poor due to the constraints of WASM, but there is
work being done on a transform to allow try/catch and Rust style
results.
@Thomasvdam Thomasvdam merged commit 3c99a53 into main Oct 28, 2024
1 check passed
@Thomasvdam Thomasvdam deleted the feat/invalid-json-parsing branch October 28, 2024 08:53
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