Can jsonschema tell me why my json file is incorrect?

56 views
Skip to first unread message

Jeremy Conlin

unread,
Jul 31, 2018, 7:18:10 PM7/31/18
to jsonschema - An implementation of JSON Schema for Python
I'm trying to develop a schema that conforms to draft-07 (or later). I'm using jsonschema to help me understand if my schema is valid—according to the draft. 

When I execute like:

jsonschema -i example.json draft-07.json

I get the error:

usage: jsonschema [-h] [-i INSTANCES] [-F ERROR_FORMAT] [-V VALIDATOR] schema
jsonschema: error: argument -i/--instance: invalid _json_file value: 'example.json'

So my example.json file isn't valid, but I want to know why. Can jsonschema tell me this?

Thanks,
Jeremy

Julian Berman

unread,
Aug 1, 2018, 4:07:03 AM8/1/18
to Jeremy Conlin, jsonschema - An implementation of JSON Schema for Python
The regular JSON module can here.

Try e.g. python -m json.tool example.json

-J

--
You received this message because you are subscribed to the Google Groups "jsonschema - An implementation of JSON Schema for Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsonschema+...@googlegroups.com.
To post to this group, send email to jsons...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages