mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 02:24:58 +02:00
Dataframe feature for plugins (#3424)
This commit is contained in:
@ -21,4 +21,8 @@ serde_json = "1.0.57"
|
||||
surf = "1.0.3"
|
||||
url = "2.1.1"
|
||||
|
||||
[features]
|
||||
dataframe = ["nu-protocol/dataframe"]
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -400,6 +400,14 @@ pub fn value_to_json_value(v: &Value) -> Result<serde_json::Value, ShellError> {
|
||||
}
|
||||
|
||||
UntaggedValue::Table(l) => serde_json::Value::Array(json_list(l)?),
|
||||
#[cfg(feature = "dataframe")]
|
||||
UntaggedValue::Dataframe(_) => {
|
||||
return Err(ShellError::labeled_error(
|
||||
"Cannot convert dataframe",
|
||||
"Cannot convert dataframe",
|
||||
&v.tag,
|
||||
))
|
||||
}
|
||||
UntaggedValue::Error(e) => return Err(e.clone()),
|
||||
UntaggedValue::Block(_) | UntaggedValue::Primitive(Primitive::Range(_)) => {
|
||||
serde_json::Value::Null
|
||||
|
Reference in New Issue
Block a user