stepflow-json 0.0.3

StepFlow flow definitions using JSON
Documentation

Parse StepFlow Flow definitions in JSON for a Session

The main function to use is [parse_session_json]

Examples

# use stepflow::{ Session, SessionId };
# use stepflow_json::parse_session_json;
const JSON: &str = r#"
{
"vars": {
"name": "String",
"email": "Email"
},
"steps": {
"$root": {
"substeps": ["nameStep", "emailStep"],
"outputs": ["name","email"]
},
"nameStep": {
"outputs": ["name"]
},
"emailStep": {
"outputs": ["email"]
}
},
"actions": {
"$all": { "type": "HtmlForm" }
}
}"#;

// Parse JSON to a Session
let mut session = Session::new(SessionId::new(0));
parse_session_json(&mut session, JSON, false).unwrap();