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

check if a given String is valid json #323

Open
ghost opened this issue Jun 15, 2021 · 1 comment
Open

check if a given String is valid json #323

ghost opened this issue Jun 15, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 15, 2021

I was looking for an isjson(::String) function that checks for valid json, such that I can walk over an HTML tree to check nodes for json scripts without exception handling

@quinnj
Copy link
Member

quinnj commented Jun 17, 2021

As somewhat of an interesting historical relic, HTTP.jl has a isjson function; it could perhaps be repurposed and included in the package here: https://github.com/JuliaWeb/HTTP.jl/blob/209f10eaa0d51372e0ed7f6127bff7a37047349d/src/sniff.jl#L287

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

No branches or pull requests

1 participant