From c7ce9909c86445360c9a2b960cde13d4380679ba Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 15 Dec 2016 20:25:02 +0100 Subject: CompositeChat: Use shorter JSON format. --- src/CompositeChat.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CompositeChat.cpp b/src/CompositeChat.cpp index 657d88292..621c871c8 100644 --- a/src/CompositeChat.cpp +++ b/src/CompositeChat.cpp @@ -406,7 +406,14 @@ AString cCompositeChat::CreateJsonString(bool a_ShouldUseChatPrefixes) const msg["extra"].append(Part); } // for itr - Parts[] - return msg.toStyledString(); + #if 1 + // Serialize as machine-readable string (no whitespace): + Json::FastWriter writer; + return writer.write(msg); + #else + // Serialize as human-readable string (pretty-printed): + return msg.toStyledString(); + #endif } -- cgit v1.2.3