mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 21:41:35 +00:00
feature: serde-json → serde_json
This commit is contained in:
parent
64a8094aaf
commit
dcabf0cf1a
@ -193,7 +193,7 @@ fn test_json() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "serde-json")]
|
||||
#[cfg(feature = "serde_json")]
|
||||
#[derive(Template)]
|
||||
#[template(
|
||||
source = r#"{
|
||||
@ -207,7 +207,7 @@ struct PrettyJsonTemplate<'a> {
|
||||
bar: &'a Value,
|
||||
}
|
||||
|
||||
#[cfg(feature = "serde-json")]
|
||||
#[cfg(feature = "serde_json")]
|
||||
#[test]
|
||||
fn test_pretty_json() {
|
||||
let val = json!({"arr": [ "one", 2, true, null ]});
|
||||
@ -232,7 +232,7 @@ fn test_pretty_json() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "serde-json")]
|
||||
#[cfg(feature = "serde_json")]
|
||||
#[derive(Template)]
|
||||
#[template(source = r#"{{ bar|json(indent)|safe }}"#, ext = "txt")]
|
||||
struct DynamicJsonTemplate<'a> {
|
||||
@ -240,7 +240,7 @@ struct DynamicJsonTemplate<'a> {
|
||||
indent: &'a str,
|
||||
}
|
||||
|
||||
#[cfg(feature = "serde-json")]
|
||||
#[cfg(feature = "serde_json")]
|
||||
#[test]
|
||||
fn test_dynamic_json() {
|
||||
let val = json!({"arr": ["one", 2]});
|
||||
|
Loading…
x
Reference in New Issue
Block a user