diff --git a/CHANGELOG.md b/CHANGELOG.md index 74053d4e2..57b71b6bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ * nostr: fix `TagStanderd::to_vec` ([nanikamado]) * nostr: fix broken intra doc links ([Yuki Kishimoto]) +* nostr: fix `JsonUtil::try_as_pretty_json` method ([Yuki Kishimoto]) ### Removed diff --git a/crates/nostr/src/util/mod.rs b/crates/nostr/src/util/mod.rs index ed1e790f5..c20334dd7 100644 --- a/crates/nostr/src/util/mod.rs +++ b/crates/nostr/src/util/mod.rs @@ -85,7 +85,7 @@ where /// Serialize as pretty JSON string #[inline] fn try_as_pretty_json(&self) -> Result { - Ok(serde_json::to_string(self)?) + Ok(serde_json::to_string_pretty(self)?) } }