From: Felix Ableitner Date: Fri, 15 Nov 2019 17:31:25 +0000 (+0100) Subject: preserve json order X-Git-Url: http://these/git/%22https:/join-lemmy.org/%7B%60%24%7BarchiveTodayUrl%7D/static/git-favicon.png?a=commitdiff_plain;h=20966e085aba521c30b16e56b4a08bc056e02630;p=lemmy.git preserve json order --- diff --git a/server/Cargo.lock b/server/Cargo.lock index 5f9d7838..c135bbe6 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -1833,6 +1833,7 @@ name = "serde_json" version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.97 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/server/Cargo.toml b/server/Cargo.toml index 3f555829..9d20c643 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -12,7 +12,7 @@ bcrypt = "0.5.0" activitypub = "0.1.5" chrono = { version = "0.4.7", features = ["serde"] } failure = "0.1.5" -serde_json = "1.0.40" +serde_json = { version = "1.0.40", features = ["preserve_order"]} serde = { version = "1.0.94", features = ["derive"] } actix = "0.8.3" actix-web = "1.0" diff --git a/server/src/main.rs b/server/src/main.rs index 9afc12b1..8c77199f 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -11,7 +11,6 @@ use lemmy_server::nodeinfo; use lemmy_server::websocket::server::*; use std::env; use std::time::{Duration, Instant}; -use actix_web::http::header::ContentType; embed_migrations!();