Communicating with CWL via JSON

I am developing a set of tools and wish to communicate with CWL purely via JSON files/strings

I understand that CWL is able to take JSON input.
https://www.commonwl.org/user_guide/introduction/quick-start.html

I don’t see many JSON examples, mostly what I come across are YAML files.

Is there some CWL (JSON) schema I can use to validate that the CWL-JSON file I am writing out has the correct content before I send them to CWL for processing ?

This allows me to focus on ensure my generated files are correct and help with problem isolation.

Cheers

JSON syntax is a subset of YAML syntax, so you can use JSON anywhere YAML is accepted.

You can use cwltool --validate <workflow.cwl> to check that a CWL file is valid.

1 Like