Skip to content

Add a script to verify json syntax#105

Merged
kytrinyx merged 1 commit intomasterfrom
jsonlint
Aug 29, 2015
Merged

Add a script to verify json syntax#105
kytrinyx merged 1 commit intomasterfrom
jsonlint

Conversation

@kytrinyx
Copy link
Copy Markdown
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