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

Accept any type as default json parser value (number 2) #240

Closed
wants to merge 4 commits into from

Conversation

bvanelli
Copy link
Contributor

This is a copy of #198

I finally wrote the tests. Here is also some consideration, lists and dicts should be directly considered as json (as well as null itself), but strings should always be parsed as they are not valid json.

https://stackoverflow.com/questions/7487869/is-this-simple-string-considered-valid-json

Python agrees with this definition:

import json
json.loads("{}")       # works
json.loads("[]")       # works
json.loads("null")     # works
json.loads("string")   # raises error

@bvanelli
Copy link
Contributor Author

Hello @sloria , could you take a look?

@sloria
Copy link
Owner

sloria commented Jan 8, 2024

Sorry for the looong delay here. Thanks for the PR update! Will merge and release this shortly

@sloria sloria enabled auto-merge (squash) January 8, 2024 22:47
@sloria sloria mentioned this pull request Jan 8, 2024
@sloria sloria closed this in #309 Jan 8, 2024
auto-merge was automatically disabled January 8, 2024 22:51

Pull request was closed

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.

3 participants