stepflow-json 0.0.3

StepFlow flow definitions using JSON
Documentation
  • Coverage
  • 14.29%
    2 out of 14 items documented1 out of 1 items with examples
  • Size
  • Source code size: 26.03 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.97 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • johnwana

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