From 5b659957cdb8d7558ba9d0b703fb309279db6cc0 Mon Sep 17 00:00:00 2001 From: ngutech21 Date: Mon, 29 Jul 2024 13:49:07 +0200 Subject: [PATCH] fix: preserve order when serializing to json --- Cargo.lock | 1 + moksha-core/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 84cc6e3c..ddc44464 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3338,6 +3338,7 @@ version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ + "indexmap 2.2.6", "itoa", "ryu", "serde", diff --git a/moksha-core/Cargo.toml b/moksha-core/Cargo.toml index 3209aa09..b211675e 100644 --- a/moksha-core/Cargo.toml +++ b/moksha-core/Cargo.toml @@ -17,7 +17,7 @@ base64 = { workspace = true } bitcoin_hashes = "0.14.0" secp256k1 = { workspace = true, default-features = true, features = ["rand", "serde"] } serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } +serde_json = { workspace = true, features = ["preserve_order"] } hex = { workspace = true } serde_with = { workspace = true } thiserror = { workspace = true }