add in a raw flag in the command to json (#555)

* add in the method to_string_raw

* add in a raw flag to json

* add in a test
This commit is contained in:
Michael Angerman
2021-12-22 11:56:49 -08:00
committed by GitHub
parent 061c822c5d
commit 5d3b63fa90
4 changed files with 50 additions and 3 deletions

View File

@@ -1324,3 +1324,11 @@ fn cjk_in_substrings() -> TestResult {
"title-page.md",
)
}
#[test]
fn to_json_raw_flag() -> TestResult {
run_test(
"[[a b]; [jim susie] [3 4]] | to json -r",
r#"[{"a":"jim","b":"susie"},{"a":3,"b":4}]"#,
)
}