Reputation: 2421
I simply want to validate a JSON
file with the proper JSON
schema I have written, just to check if I did everything right. Is there a command line tool or anything else for this (I'm on Ubuntu)? Everything I found yet, are packages for several programming languages for writing validation methods in code.
I just need a tool where I can specify my JSON
file and my custom schema
and check it. That's it...
Upvotes: 0
Views: 1458
Reputation: 13635
You have a couple of options. Please have a look at json-schema validators implementations to find the one that most suits your needs.
You can use fge java json schema validator from the command line as it is explained here.
If you are comfortable with python, you can also use jsonschema python package and run it from any python console:
from jsonschema import validate
validate(json, schema)
Another popular javascript library is tv4. You can use it directly in the browser, or in node console.
var valid = tv4.validate(json, schema);
Upvotes: 1