Post AbNZf31BPRZ07ml2qu by steve@deliverabilit.ie
(DIR) More posts by steve@deliverabilit.ie
(DIR) Post #AbNVKrbPk8Tj6xpBmS by simon@fedi.simonwillison.net
2023-11-01T23:38:02Z
0 likes, 0 repeats
What are the best command line tools for working with JSON schemas?I am particularly interested in tools that can validate a JSON file against a provided schema and return useful error messages
(DIR) Post #AbNVkDZJD8qiTevhkO by DannoHung@hachyderm.io
2023-11-01T23:42:44Z
0 likes, 0 repeats
@simon had this issue just recently. Ended up using boon since it was pretty easy to integrate the build tool and ships as a fairly small static binary after stripping. Would probably want to do a library integration eventually though. https://github.com/santhosh-tekuri/boon
(DIR) Post #AbNW58i0TTSfUDySsC by benlk@newsie.social
2023-11-01T23:46:22Z
0 likes, 0 repeats
@simon `jq` is very useful for parsing and querying JSON, but it doesn't have schema-specific validation. https://jqlang.github.io/jq/manual/
(DIR) Post #AbNYDIsck2gZFzxe2C by earth2marsh@hachyderm.io
2023-11-02T00:10:19Z
0 likes, 0 repeats
@simon Tagging @handrews , who likely has a suggestion to make or a direction to point in...
(DIR) Post #AbNZf31BPRZ07ml2qu by steve@deliverabilit.ie
2023-11-02T00:26:29Z
0 likes, 0 repeats
@simon I’ve been using https://github.com/python-jsonschema/check-jsonschema to validate data against a schema. It’s fine, installs from homebrew, has already found several bugs in my data pipeline.
(DIR) Post #AbNabN8elA6bK644Wm by jannem@fosstodon.org
2023-11-02T00:37:15Z
0 likes, 0 repeats
@simon People rejected XML for JSON because XML was perceived to be clunky and formal.And so of course they end up reinventing XML in JSON.
(DIR) Post #AbNdIc8V4i3iCIjrMW by DopeGhoti@infosec.exchange
2023-11-02T01:07:31Z
0 likes, 0 repeats
@simon I believe jq brings a lot to the table, but I am not an expert with it.
(DIR) Post #AbNnYTrGcRKChNslvM by simon@fedi.simonwillison.net
2023-11-02T02:59:45Z
0 likes, 0 repeats
https://github.com/python-jsonschema/check-jsonschema via @steve looks like what I wanted
(DIR) Post #AbNqIskqaQjB8v8KCu by sethmlarson@fosstodon.org
2023-11-02T03:33:10Z
0 likes, 0 repeats
@simon @steve Be very careful with this tool, make sure you check that it fails before assuming that it works. I vaguely remember some way that checking a document's schema would silently pass. Perhaps something to do with schemafile that is a URL, can't recall.