Skip to main content

extract_run_params_from_json

Function extract_run_params_from_json 

Source
pub fn extract_run_params_from_json(body: &Value) -> ExtractedRunParams
Expand description

Walks a JSON Parameters body (or any object with a parameter array) and pulls every SoF v2 run-operation field into ExtractedRunParams.

Returns an empty struct when body isn’t a Parameters resource — call sites that may receive a bare ViewDefinition should detect that case separately (e.g. via body_has_view_definition). Repeated entries for the same scalar field keep the first value; patient / group / inline_resources accumulate.