mirror of
https://github.com/nushell/nushell
synced 2025-01-15 22:54:16 +00:00
Fix from_json to use Nothing
This commit is contained in:
parent
a4fa5628ea
commit
481722b80a
1 changed files with 1 additions and 3 deletions
|
@ -32,9 +32,7 @@ fn convert_json_value_to_nu_value(v: &serde_hjson::Value, tag: impl Into<Tag>) -
|
||||||
let tag = tag.into();
|
let tag = tag.into();
|
||||||
|
|
||||||
match v {
|
match v {
|
||||||
serde_hjson::Value::Null => {
|
serde_hjson::Value::Null => Value::Primitive(Primitive::Nothing).tagged(tag),
|
||||||
Value::Primitive(Primitive::String(String::from(""))).tagged(tag)
|
|
||||||
}
|
|
||||||
serde_hjson::Value::Bool(b) => Value::Primitive(Primitive::Boolean(*b)).tagged(tag),
|
serde_hjson::Value::Bool(b) => Value::Primitive(Primitive::Boolean(*b)).tagged(tag),
|
||||||
serde_hjson::Value::F64(n) => {
|
serde_hjson::Value::F64(n) => {
|
||||||
Value::Primitive(Primitive::Float(OF64::from(*n))).tagged(tag)
|
Value::Primitive(Primitive::Float(OF64::from(*n))).tagged(tag)
|
||||||
|
|
Loading…
Reference in a new issue