Skip to content

Commit 342c385

Browse files
committed
run_string should parse as yaml not json
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 3de0ec5 commit 342c385

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pdl-live-react/src-tauri/src/pdl/interpreter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use ollama_rs::{
1818
};
1919

2020
use serde_json::{from_str, to_string, Map, Value};
21-
use serde_norway::from_reader;
21+
use serde_norway::{from_reader, from_str as from_yaml_str};
2222

2323
use crate::pdl::ast::{
2424
PdlBlock, PdlCallBlock, PdlModelBlock, PdlParser, PdlPythonCodeBlock, PdlRepeatBlock,
@@ -466,7 +466,7 @@ pub fn run_file(source_file_path: &str, debug: bool) -> Interpretation {
466466
}
467467

468468
pub fn run_string(source: &str, debug: bool) -> Interpretation {
469-
run(&from_str(source)?, debug)
469+
run(&from_yaml_str(source)?, debug)
470470
}
471471

472472
pub fn run_json(source: Value, debug: bool) -> Interpretation {

0 commit comments

Comments
 (0)