Add 'from json'

This commit is contained in:
JT
2021-10-01 18:11:49 +13:00
parent d34e083976
commit 3e232a5db8
37 changed files with 4722 additions and 42 deletions

View File

@ -382,3 +382,17 @@ fn module_imports_5() -> TestResult {
"3",
)
}
#[test]
fn from_json_1() -> TestResult {
run_test(r#"('{"name": "Fred"}' | from json).name"#, "Fred")
}
#[test]
fn from_json_2() -> TestResult {
run_test(
r#"('{"name": "Fred"}
{"name": "Sally"}' | from json -o).name.1"#,
"Sally",
)
}