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

Fails to throw exception when parsing object property name without a matching value #32

Closed
j-brooke opened this issue May 2, 2024 · 1 comment
Assignees

Comments

@j-brooke
Copy link
Owner

j-brooke commented May 2, 2024

While parsing an object, a string at the end of an object that should throw an exception is ignored.

Both of these cases will be accepted without throwing an error in the current version (4.0.0):

{ "a": 1, "b" }
{ "a": 1, "b": }

The output with default settings is:

{"a": 1}

The "b" in the input text is interpreted as a property name, but there is no associated value. Therefore, it's invalid JSON. The correct behavior is to throw an exception to indicate that.

@j-brooke j-brooke self-assigned this May 2, 2024
@j-brooke j-brooke added this to In progress in FracturedJson project May 2, 2024
@j-brooke
Copy link
Owner Author

j-brooke commented May 4, 2024

Fixed in v4.0.1 (all versions)

@j-brooke j-brooke closed this as completed May 4, 2024
@j-brooke j-brooke moved this from In progress to Done in FracturedJson project May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant