Skip to main content
Use INPUT_JSON_WITH_VALIDATION when a published workflow accepts a JSON value. Supply a JSON string in value; add a JSON Schema string in the optional schema configuration to require particular fields and types. A valid object is returned in result for downstream steps.

Require fields in the incoming JSON

The example returns an object with result.name equal to Ada. If age is missing or the JSON is malformed, the step fails with an Invalid JSON error and result is null. If value is empty and optional is false, the step fails with JSON value is required. Without a schema, the tool parses JSON but does not check the extra field requirements. use_as_input defaults to true; optional defaults to false. Set optional to true only if downstream steps can handle a null result. For validating a JSON value returned at the end of a workflow, use Output JSON with Validation.