diff --git a/Cargo.lock b/Cargo.lock index a00caf3..c2d34ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2173,6 +2173,51 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "pest_meta" +version = "2.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + [[package]] name = "phf" version = "0.10.1" @@ -2420,6 +2465,7 @@ dependencies = [ "serde", "serde-value", "serde_json", + "serde_json5", "serde_with", "smart-default", "str-macro", @@ -2964,6 +3010,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_json5" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a6b754515e1a7bd79fc2edeaecee526fc80cb3a918607e5ca149225a3a9586" +dependencies = [ + "pest", + "pest_derive", + "serde", +] + [[package]] name = "serde_path_to_error" version = "0.1.15" @@ -3873,6 +3930,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "unic-char-property" version = "0.9.0" diff --git a/Cargo.toml b/Cargo.toml index 6fbd69d..fef0d28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,6 +46,7 @@ rust-embed = { version = "8.0.0", features = ["axum", "mime-guess", "include-exc serde = { version = "1.0.164", features = ["serde_derive"] } serde-value = "0.7.0" serde_json = "1.0.99" +serde_json5 = "0.1.0" serde_with = "3.0.0" smart-default = "0.7.1" str-macro = "1.0.0" diff --git a/minijinja/base.jinja b/minijinja/base.jinja index 04a69f3..f01679a 100644 --- a/minijinja/base.jinja +++ b/minijinja/base.jinja @@ -82,21 +82,51 @@