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

how should I check a string is valid JSON string ? #653

Closed
zhishupp opened this issue Jul 11, 2017 · 7 comments
Closed

how should I check a string is valid JSON string ? #653

zhishupp opened this issue Jul 11, 2017 · 7 comments
Labels
solution: duplicate the issue is a duplicate; refer to the linked issue instead

Comments

@zhishupp
Copy link

I read all examples, but I didnt find a way to check a string is valid JSON string.
Is there an API to achieve this ? or I have to use "try catch" to check exceptions ?
thanks ^_^

@zhishupp
Copy link
Author

ok, I noticed my question is just the same as #458 , so there will be a validation function in Release 3.0.1 ?

@nlohmann
Copy link
Owner

This is planned for 3.0.0, but I need to decide on how to best expose all possible parser/validation/format combinations which I discussed in #623. Therefore, this may take a while.

@nlohmann nlohmann added the solution: duplicate the issue is a duplicate; refer to the linked issue instead label Jul 11, 2017
@nlohmann
Copy link
Owner

Duplicate of #458.

@machinetherapist
Copy link

@nlohmann any news ?

@nlohmann
Copy link
Owner

nlohmann commented Dec 9, 2020

See https://json.nlohmann.me/api/basic_json/accept/

@anonymous9892
Copy link

In python use type(string_name)

@ghost
Copy link

ghost commented Dec 15, 2020

that is true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: duplicate the issue is a duplicate; refer to the linked issue instead
Projects
None yet
Development

No branches or pull requests

4 participants