Object also should not turn into a string during javascript escape.
This commit is contained in:
parent
96e8dd63a7
commit
5424543122
@ -195,6 +195,9 @@ fn apply_filter(
|
||||
(serde_json::Value::Number(number), Filter::JavascriptStringEncode) => {
|
||||
Ok(serde_json::Value::Number(number.clone()))
|
||||
}
|
||||
(serde_json::Value::Object(obj), Filter::JavascriptStringEncode) => {
|
||||
Ok(serde_json::Value::Object(obj.clone()))
|
||||
}
|
||||
(_, Filter::JavascriptStringEncode) => Ok(serde_json::Value::String(javascript_escape(
|
||||
&json_value.render(&Vec::new())?,
|
||||
))),
|
||||
|
Loading…
x
Reference in New Issue
Block a user