From f396c6c94007d0a700ca0ff07d20e3cd0b006829 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 15 Nov 2019 18:31:25 +0100 Subject: [PATCH] preserve json order --- server/Cargo.lock | 1 + server/Cargo.toml | 2 +- server/src/main.rs | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) 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!();