diff options
-rw-r--r-- | src/CompositeChat.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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 } |