Skip to content

Add a script to verify json syntax #105

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

Merged
merged 1 commit into from
Aug 29, 2015
Merged

Add a script to verify json syntax #105

merged 1 commit into from
Aug 29, 2015

Conversation

kytrinyx
Copy link
Member

This is a useful sanity check to have as we start adding shared
test data.

It uses the jq library, which is a compiled C binary. It might be a bit heavy-handed, since jq is actually all about parsing and querying JSON on the command-line, but the other options were to install NPM to use a javascript library, or to use Ruby or Python, or build a small sanity-checker in Go. Since jq already exists and it's light-weight, I figured that was the best choice right now.

I didn't find any mature bash libraries that could validate json.

Another option would be to use curl to hit jsonlint.com--but somehow that feels a bit dirty.

This is a useful sanity check to have as we start adding shared
test data.
kytrinyx added a commit that referenced this pull request Aug 29, 2015
Add a script to verify json syntax
@kytrinyx kytrinyx merged commit e09c4d4 into master Aug 29, 2015
@kytrinyx kytrinyx deleted the jsonlint branch August 29, 2015 18: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.

1 participant