3 releases

0.0.3 Mar 31, 2021
0.0.2 Mar 31, 2021
0.0.1 Mar 20, 2021

#5 in #step-flow


Used in stepflow-wasm

Apache-2.0

25KB
471 lines

Parse StepFlow Flow definitions in JSON for a Session

The main function to use is parse_session_json

Examples

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();

Dependencies

~265KB