Skip writing out spanned and spans (meant for internal use)
This commit is contained in:
parent
60f4436849
commit
d20a72abb6
|
@ -1,4 +1,5 @@
|
||||||
use crate::commands::command::SinkCommandArgs;
|
use crate::commands::command::SinkCommandArgs;
|
||||||
|
use crate::commands::to_json::value_to_json_value;
|
||||||
use crate::errors::ShellError;
|
use crate::errors::ShellError;
|
||||||
use crate::object::{Primitive, Value};
|
use crate::object::{Primitive, Value};
|
||||||
use crate::parser::Spanned;
|
use crate::parser::Spanned;
|
||||||
|
@ -64,7 +65,7 @@ pub fn save(args: SinkCommandArgs) -> Result<(), ShellError> {
|
||||||
"saving to json requires a single object (or use --raw)",
|
"saving to json requires a single object (or use --raw)",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
serde_json::to_string(&args.input[0]).unwrap()
|
serde_json::to_string(&value_to_json_value(&args.input[0])).unwrap()
|
||||||
}
|
}
|
||||||
Some(x) if x == "yml" && !save_raw => {
|
Some(x) if x == "yml" && !save_raw => {
|
||||||
if args.input.len() != 1 {
|
if args.input.len() != 1 {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user