Module debug

Module debug 

Source
Expand description

Debug helpers for serializing/deserializing plans, useful for goldens/CLI.

use daedalus_planner::{debug, Graph, ExecutionPlan};

let plan = ExecutionPlan::new(Graph::default(), vec![]);
let json = debug::to_pretty_json(&plan);
let round = debug::from_json(&json).unwrap();
assert_eq!(plan.version, round.version);

Functionsยง

from_json
Deserialize a plan from JSON.
to_json
Serialize a plan to compact JSON.
to_pretty_json
Serialize a plan to pretty-printed JSON.