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

Strict JSON parsing #11592

Merged
merged 5 commits into from Jan 30, 2024
Merged

Strict JSON parsing #11592

merged 5 commits into from Jan 30, 2024

Conversation

IanManske
Copy link
Member

Description

Adds the --strict flag for from json which will try to parse text while following the exact JSON specification (e.g., no comments or trailing commas allowed). Fixes issue #11548.

@IanManske
Copy link
Member Author

I opted to use serde_json instead of modifying nu_json, since this should be more futureproof and less error prone.
serde_json was already one of our dependencies, so it looks like the PR only adds ~45KiB to the binary size.

@IanManske IanManske marked this pull request as ready for review January 22, 2024 15:29
@fdncred
Copy link
Collaborator

fdncred commented Jan 30, 2024

I looked through this @IanManske. Are we ready to land it?

@IanManske
Copy link
Member Author

Yep, I think this is ready!

@fdncred fdncred merged commit 4e0a65c into nushell:main Jan 30, 2024
20 checks passed
@fdncred
Copy link
Collaborator

fdncred commented Jan 30, 2024

Thanks

@hustcer hustcer added this to the v0.90.0 milestone Feb 3, 2024
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this pull request Feb 20, 2024
# Description
Adds the `--strict` flag for `from json` which will try to parse text
while following the exact JSON specification (e.g., no comments or
trailing commas allowed). Fixes issue nushell#11548.
@IanManske IanManske deleted the json-strict branch March 5, 2024 21:33
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.

None yet

3 participants