mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-06-12 23:51:26 +00:00
Return Option<Value> from fun on replace_with to all user to return None (remove the value and not replace with Null)
This commit is contained in:
@ -224,7 +224,7 @@ fn readme_selector_mut() {
|
||||
0
|
||||
};
|
||||
|
||||
json!(age)
|
||||
Some(json!(age))
|
||||
})
|
||||
.unwrap()
|
||||
.take()
|
||||
@ -522,7 +522,7 @@ fn readme_replace_with() {
|
||||
0
|
||||
};
|
||||
|
||||
json!(age)
|
||||
Some(json!(age))
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
|
@ -23,7 +23,7 @@ fn selector_mut() {
|
||||
if let Value::Number(n) = v {
|
||||
nums.push(n.as_f64().unwrap());
|
||||
}
|
||||
Value::String("a".to_string())
|
||||
Some(Value::String("a".to_string()))
|
||||
})
|
||||
.unwrap()
|
||||
.take()
|
||||
|
Reference in New Issue
Block a user